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 186 lines (136 sloc) 4.01 KB
#! /bin/bash
{
PKG=signal-desktop
VERSION=5.58.0
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
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 </dev/null
mkdir -vp $PREFIX
cat >$PREFIX/profile <<EOF
PATH=$PREFIX/bin:\$PATH
EOF
. $PREFIX/profile
export MAKEFLAGS="-j $(nproc)"
# BUILDDIR=$PREFIX/build
BUILDDIR=$BUILD_TMPDIR/build
mkdir -p $BUILDDIR
cd $BUILDDIR
true && {
. /pkg/node-16.15.0-0/profile
}
false && {
# github actions node
# wget "https://github.com/actions/node-versions/releases/download/16.15.0-2233943534/node-16.15.0-linux-x64.tar.gz"
SRCURL="https://beehive.molgen.mpg.de/b91a5747cb53d171b6abbd6f434e8c62/node-16.15.0-linux-x64.tar.gz"
PKGARC=${SRCURL##*/}
PKGVER=${PKGARC%.*.*}
PKGVER=${PKGVER%-linux-x64}
test -e ${PKGARC} || wget -nv ${SRCURL}
test -d ${PKGVER} || mkdir -p ${PKGVER} && tar -x --directory=${PKGVER} -f ${PKGARC}
PATH=${BUILDDIR}/${PKGVER}/bin:$PATH
export PATH
}
[ -d AUR ] || mkdir AUR
# git clone https://aur.archlinux.org/signal-desktop-beta.git
# bee download https://aur.archlinux.org/signal-desktop-beta.git
# md5repo.sh
# "https://beehive.molgen.mpg.de/42cfe76a1a9d99d567089480a013520a/signal-desktop-beta-0_t1624482517_ab785f8.tar.bz2"
SRCURL="https://beehive.molgen.mpg.de/7493ee787a42c9dd2cb304f8aa6aa2e0/signal-desktop-beta-0_t1662000618_6f90a95.tar.bz2"
PKGARC=${SRCURL##*/}
# =signal-desktop-beta-0_t1624482517_ab785f8.tar.bz2
PKGVER=${PKGARC%.*.*}
[ -s ${PKGARC} ] || wget $SRCURL
test -e ${PKGARC} || wget -nv ${SRCURL}
tar -x -v --directory=AUR --strip-components=1 -f ${PKGARC}
# get git lfs organized
(
#go get github.com/git-lfs/git-lfs
#cd ${HOME}/go/src/github.com/git-lfs/git-lfs
#make
mkdir -p bin
cd bin
wget "https://beehive.molgen.mpg.de/f07153c9add38691457af31d5ef60d89/git-lfs"
chmod -v 755 git-lfs
)
PATH=${BUILDDIR}/bin:$PATH
export PATH
#[ -d Signal-Desktop ] || git clone https://github.com/signalapp/Signal-Desktop.git
SRCURL[0]="https://beehive.molgen.mpg.de/325d36a7ed0062270f4acff6e620fc6d/Signal-Desktop-v5.58.0-beta.1-db155b975.tar"
PKGARC=${SRCURL##*/}
test -e ${PKGARC} || wget -nv ${SRCURL}
test -d Signal-Desktop || tar -xf ${PKGARC}
cd Signal-Desktop
git-lfs install
# git checkout tags/v${VERSION}
git checkout tags/v5.58.0
# allow higher node versions
#sed 's#"node": "#&>=#' -i package.json
# workaround https://github.com/yarnpkg/yarn/issues/7584
cat >$HOME/.yarnrc <<EOF0
unsafe-disable-integrity-migration false
EOF0
npm config set color false
#npm config set proxy http://beehive:3128
#npm config set https-proxy https://beehive.molgen.mpg.de:3128
type npm
npm --version
type node
node --version
type yarn
yarn --version
yarn install --frozen-lockfile
yarn generate
yarn prepare-beta-build
yarn build
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
}