Skip to content

Commit

Permalink
Merge pull request #268 from mariux64/add-pulsar
Browse files Browse the repository at this point in the history
pulsar: add version 1.113.0
  • Loading branch information
david authored Jan 17, 2024
2 parents f871085 + 01e2cbe commit 1c529d7
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pulsar-1.113.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#! /bin/bash

PKG=pulsar
VERSION=1.113.0
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi

set -xe
umask 022

BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home

exec </dev/null

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile

export MAKEFLAGS="-j $(nproc)"

BUILDDIR=$PREFIX/build

test -e ${BUILDDIR} || mkdir -p $BUILDDIR
cd $BUILDDIR

test -e opt && rm -rf opt
test -e usr && rm -rf usr

test -e Linux.pulsar_${VERSION}_amd64.deb || wget https://github.com/pulsar-edit/pulsar/releases/download/v1.113.0/Linux.pulsar_${VERSION}_amd64.deb

ar x Linux.pulsar_${VERSION}_amd64.deb
tar -xvf data.tar.xz

cat /src/mariux/patches/pulsar-start-script.patch |patch -p1

install -d -Dm 755 ${PREFIX}/{bin,share,icons}

install -m 755 opt/Pulsar/resources/pulsar.sh ${PREFIX}/bin/pulsar
cp -ar opt/Pulsar ${PREFIX}/share

# Cleanup specs. Remove if implemented upstream
find "${PREFIX}/share/Pulsar/resources/app/ppm" -type d -name "spec" -exec rm -rf {} +
find "${PREFIX}/share/Pulsar/resources/app.asar.unpacked" -type d -name "spec" -exec rm -rf {} +

install -d -Dm 755 "${PREFIX}/share/icons/hicolor/scalable/apps"
cp "${BUILDDIR}/opt/Pulsar/resources/pulsar.svg" "${PREFIX}/share/icons/hicolor/scalable/apps/pulsar.svg"

0 comments on commit 1c529d7

Please sign in to comment.