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 162 lines (113 sloc) 3.86 KB
#! /bin/bash
PKG=signal-desktop
VERSION=5.15.0
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi
# error signal-desktop@1.40.1: The engine "node" is incompatible with this module. Expected version "12.18.3". Got "12.13.0"
# error signal-desktop@5.6.1: The engine "node" is incompatible with this module. Expected version "14.16.0". Got "12.18.3"
# WTF
# error signal-desktop@5.6.1: The engine "node" is incompatible with this module. Expected version "14.16.0". Got "14.17.1"
. /pkg/node-14.16.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
TMPDIR=$BUILD_TMPDIR
export TMPDIR
HOME=$BUILD_TMPDIR/home
export HOME
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 -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 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"
GITAUR=signal-desktop-beta-0_t1624482517_ab785f8.tar.bz2
[ -s ${GITAUR} ] || wget "https://beehive.molgen.mpg.de/42cfe76a1a9d99d567089480a013520a/signal-desktop-beta-0_t1624482517_ab785f8.tar.bz2"
tar -x -v --directory=AUR --strip-components=1 -f ${GITAUR}
# 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
ls -l git-lfs
)
PATH=${BUILDDIR}/bin:$PATH
export PATH
[ -d Signal-Desktop ] || git clone https://github.com/signalapp/Signal-Desktop.git
cd Signal-Desktop
# git pull --rebase
git-lfs install
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 config set proxy http://beehive:3128
#npm config set https-proxy https://beehive.molgen.mpg.de:3128
npm --version
node --version
npm install yarn
sed 's#"resolutions": {#"resolutions": {"node-sass/node-gyp": "^6.0.0",#' -i package.json
PATH=$PWD/node_modules/yarn/bin:$PATH
export PATH
yarn versions
yarn cache clean #workaround
yarn install --ignore-engines -f
# We can't read the release date from git so we use SOURCE_DATE_EPOCH instead
patch --forward --strip=1 --input="${BUILDDIR}/AUR/expire-from-source-date-epoch.patch"
# Gruntfile expects Git commit information which we don't have in a tarball download
# See https://github.com/signalapp/Signal-Desktop/issues/2376
#yarn generate exec:build-protobuf exec:transpile concat copy:deps sass
yarn generate
yarn prepare-beta-build
yarn build
# yarn build-release --dir
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