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 195 lines (144 sloc) 4.29 KB
#! /bin/bash -x
{
PKG=signal-desktop
VERSION=6.36.0
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 </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
false && {
. /pkg/node-18.16.0-0/profile
}
true && {
# github actions node
# wget "https://github.com/actions/node-versions/releases/download/16.15.0-2233943534/node-16.15.0-linux-x64.tar.gz"
# braucht spezielle node version und auch genau die Version
SRCURL="https://beehive.molgen.mpg.de/514acecfe7a6a6e626da056a5f867324/node-18.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
cd $PKGVER
npm install yarn
ln -sv ${BUILDDIR}/${PKGVER}/node_modules/.bin/yarn ${BUILDDIR}/${PKGVER}/bin/yarn
cd $BUILDDIR
}
[ -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
SRCURL="https://beehive.molgen.mpg.de/ecff2cca99f0ce4a57672d5e4adc6516/signal-desktop-beta-0_t1698282414_3e10596.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
# tar und auf beehive schmeissen
SRCURL[0]="https://beehive.molgen.mpg.de/3482ca71a4996d53d2e3eca8d2677010/Signal-Desktop_master_20231031.tar.bz2"
PKGARC=${SRCURL##*/}
test -e ${PKGARC} || wget -nv ${SRCURL}
test -d Signal-Desktop-${VERSION} || mkdir Signal-Desktop-${VERSION} && tar -x -v --directory=Signal-Desktop-${VERSION} --strip-components=1 -f ${PKGARC}
cd Signal-Desktop-${VERSION}
git-lfs install
git checkout tags/v${VERSION}
# 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
echo $PATH
type npm
npm --version
npm config set color false
#npm config set proxy http://beehive:3128
#npm config set https-proxy https://beehive.molgen.mpg.de:3128
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-${VERSION}/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
}