Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 55 lines (38 sloc) 1.59 KB
#! /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"