From 0639ab864cca802470fbf3e3af19b18e7bb29c7e Mon Sep 17 00:00:00 2001 From: D Woodfall Date: Tue, 16 May 2023 21:06:25 +0100 Subject: network/viber: Move/modify ARCH section. Strip. Signed-off-by: bedlam Signed-off-by: Willy Sudiarto Raharjo --- network/viber/viber.SlackBuild | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'network/viber') diff --git a/network/viber/viber.SlackBuild b/network/viber/viber.SlackBuild index 249d6366fd96..d80f6442fae5 100644 --- a/network/viber/viber.SlackBuild +++ b/network/viber/viber.SlackBuild @@ -30,20 +30,26 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -case "$(uname -m)" in - i?86) DEBARCH="i386" ; LIBDIRSUFFIX="" ; ARCH=i386 ;; - x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ; ARCH=x86_64 ;; - *) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;; -esac +# 2023-05-16 DW: only 64bit supported +if [ -z "$ARCH" ]; then + ARCH=$( uname -m ) +fi + +if [ "$ARCH" != "x86_64" ]; then + echo "$ARCH architecture is unsupported." >/dev/stderr + exit 1 +fi +# 2023-05-16 DW: using this will mess up every tool known to man and SBo +# Changed all to VERSION. # Get the real version -REAL_VER=$(ar p ${PRGNAM}.deb control.tar.xz | tar JxO ./control | grep Version | awk '{print $2}' | cut -d- -f1) +#REAL_VER=$(ar p ${PRGNAM}.deb control.tar.xz | tar JxO ./control | grep Version | awk '{print $2}' | cut -d- -f1) # 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-$REAL_VER-$ARCH-$BUILD$TAG.$PKGTYPE" + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi @@ -89,12 +95,16 @@ find -L . \ chmod +x $PKG/usr/bin/ViberPC cd -mkdir -p $PKG/usr/doc/$PRGNAM-$REAL_VER -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$REAL_VER/$PRGNAM.SlackBuild +# 2023-05-16 DW: this seems to work after stripping +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 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install 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-$REAL_VER-$ARCH-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE -- cgit v1.2.3