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-6.0.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
187 lines (135 sloc)
3.9 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=6.0.1 | |
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 | |
SRCURL="https://beehive.molgen.mpg.de/054d7e172234a555b7debdb746668fea/signal-desktop-beta-0_t1669843839_9aed031.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/691907ef8be9eea529d645b844db37ad/Signal-Desktop-6.1.0_beta.1_p0_6a81b339b.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/v6.0.1 | |
# 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 | |
} |