aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorD Woodfall <dave@slackbuilds.org>2023-05-16 21:06:25 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-20 11:17:58 +0700
commit0639ab864cca802470fbf3e3af19b18e7bb29c7e (patch)
tree99775f3e61752ce35bda8422aeb445444ceb8826 /network
parentcecffc8b3189e57a18315f56c812b0fcf6d9ca63 (diff)
network/viber: Move/modify ARCH section. Strip.
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/viber/viber.SlackBuild30
1 files changed, 20 insertions, 10 deletions
diff --git a/network/viber/viber.SlackBuild b/network/viber/viber.SlackBuild
index 249d6366fd96b..d80f6442fae51 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