Permalink
Cannot retrieve contributors at this time
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?
pkg-scripts/signal-desktop-1.35.1-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
89 lines (63 sloc)
1.77 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
PKG=signal-desktop | |
VERSION=1.35.1 | |
BUILD=0 | |
PREFIX=/pkg/$PKG-$VERSION-$BUILD | |
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi | |
. /pkg/node-12.13.0-0/profile | |
export PATH | |
set -xe | |
umask 022 | |
node --version | |
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp | |
test -d $BUILD_TMPDIR && chmod -c -R u+rwx $BUILD_TMPDIR && 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 | |
EOF | |
. $PREFIX/profile | |
export MAKEFLAGS="-j $(nproc)" | |
BUILDDIR=$PREFIX/build | |
set -x | |
mkdir -p $BUILDDIR | |
cd $BUILDDIR | |
S=signal-desktop-${VERSION} | |
[ -d Signal-Desktop ] || git clone https://github.com/signalapp/Signal-Desktop.git | |
cd Signal-Desktop | |
# git pull --rebase | |
git checkout tags/v${VERSION} | |
# workaround https://github.com/yarnpkg/yarn/issues/7584 | |
cat >$HOME/.yarnrc <<EOF0 | |
unsafe-disable-integrity-migration false | |
EOF0 | |
npm config set color false | |
npm --version | |
node --version | |
npm install yarn | |
./node_modules/yarn/bin/yarn versions | |
./node_modules/yarn/bin/yarn cache clean #workaround | |
./node_modules/yarn/bin/yarn install -f #workaround | |
#./node_modules/yarn/bin/yarn # install workaround | |
./node_modules/yarn/bin/yarn generate | |
./node_modules/yarn/bin/yarn build-release | |
find ${BUILDDIR} -perm -700 ! -perm -005 -exec chmod o+rx '{}' ';' | |
for e in signal-desktop \ | |
'*.so' \ | |
'*.pak' \ | |
'*.bin' \ | |
icudtl.dat \ | |
locales \ | |
resources \ | |
; do | |
cp -ax ${BUILDDIR}/Signal-Desktop/release/linux-unpacked/$e ${PREFIX}/ | |
done | |
mkdir -p ${PREFIX}/bin | |
cat >${PREFIX}/bin/signal-desktop <<__EOS__ | |
#!/bin/sh | |
exec ${PREFIX}/signal-desktop $@ | |
__EOS__ | |
chmod 755 ${PREFIX}/bin/signal-desktop |