diff options
Diffstat (limited to 'network/signal-desktop/signal-desktop.SlackBuild')
-rw-r--r-- | network/signal-desktop/signal-desktop.SlackBuild | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/network/signal-desktop/signal-desktop.SlackBuild b/network/signal-desktop/signal-desktop.SlackBuild index b75f48c82a..935ba82bf3 100644 --- a/network/signal-desktop/signal-desktop.SlackBuild +++ b/network/signal-desktop/signal-desktop.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for signal-desktop # Copyright 2018 David O'Shaughnessy +# Copyright 2022-2024 Gregory J. L. Tourte <artourter@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,12 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=signal-desktop -VERSION=${VERSION:-1.32.3} +VERSION=${VERSION:-7.4.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -40,6 +43,14 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + # Upstream only has binary support for x86_64 at present. if [ "$ARCH" = "x86_64" ]; then DEBARCH="amd64" @@ -56,14 +67,15 @@ cd $PKG ar p $CWD/${PRGNAM}_${VERSION}_$DEBARCH.deb data.tar.xz | tar xJv chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + # create soft link for launcher mkdir -p $PKG/usr/bin -ln -sf /opt/Signal/$PRGNAM $PKG/usr/bin/$PRGNAM +ln -sf ../../opt/Signal/$PRGNAM $PKG/usr/bin/$PRGNAM + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp $PKG/usr/share/doc/$PRGNAM/* $PKG/opt/Signal/LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION @@ -75,4 +87,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |