diff --git a/signal-desktop-6.44.1-0.build.sh b/signal-desktop-6.44.1-0.build.sh new file mode 100755 index 0000000..e00316c --- /dev/null +++ b/signal-desktop-6.44.1-0.build.sh @@ -0,0 +1,195 @@ +#! /bin/bash -x +{ +PKG=signal-desktop +VERSION=6.44.1 +BUILD=0 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then + PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD +fi + +PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin +export PATH + +set -xe +umask 022 + +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 + +TMPDIR=$BUILD_TMPDIR +export TMPDIR + +HOME=$BUILD_TMPDIR/home +export HOME + +# +# cleanup ( egal ) +# + +_CLEANUP=( + ${HOME}/.cache/node-gyp + ${HOME}/.cache/pip + ${HOME}/.npm + ${HOME}/.config/configstore +) + +for i in "${_CLEANUP[@]}"; do + test -d $i && chmod -c -R u+rwx $i && rm -rf $i && echo "removed $i" +done + +cat >>${HOME}/.wgetrc <<'_EOW_' +http_proxy = beehive:3128 +https_proxy = beehive:3128 +ftp_proxy = beehive:3128 +check-certificate = quiet +_EOW_ + +git config --global http.proxy http://beehive:3128 +git config --global https.proxy https://beehive.molgen.mpg.de:3128 +git config --global advice.detachedHead false +git config --global http.sslVerify false +git config --global pack.threads 24 + +exec $PREFIX/profile <=#' -i package.json + +# workaround https://github.com/yarnpkg/yarn/issues/7584 +cat >$HOME/.yarnrc <${PREFIX}/bin/signal-desktop <<__EOS__ +#!/bin/sh +exec ${PREFIX}/signal-desktop "\$@" +__EOS__ + +chmod 755 ${PREFIX}/bin/signal-desktop +}