summaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
author Heinz Wiesinger2021-07-04 15:59:51 +0200
committer Heinz Wiesinger2021-07-17 21:55:15 +0200
commitc97816b7b2c51e61a2782cbeb6473149ad9db2de (patch)
treef4299e56424d78fa21f677a9c0c1a71d5eed71d5 /multimedia
parent8ae3289c93ea0354b3da3f13da3bd79962b41590 (diff)
downloadslackbuilds-c97816b7b2c51e61a2782cbeb6473149ad9db2de.tar.gz
multimedia/google-talkplugin: Fix support for PRINT_PACKAGE_NAME
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/google-talkplugin/google-talkplugin.SlackBuild20
1 files changed, 10 insertions, 10 deletions
diff --git a/multimedia/google-talkplugin/google-talkplugin.SlackBuild b/multimedia/google-talkplugin/google-talkplugin.SlackBuild
index baa07acb8c..53577d8d3c 100644
--- a/multimedia/google-talkplugin/google-talkplugin.SlackBuild
+++ b/multimedia/google-talkplugin/google-talkplugin.SlackBuild
@@ -38,11 +38,20 @@ if [ -z "$ARCH" ]; then
esac
fi
+case "$ARCH" in
+ i?86) DEBARCH="i386" ;;
+ x86_64) DEBARCH="amd64" ;;
+ *) echo "Not supported" ; exit 1 ;;
+esac
+
+# Get the real version, thanks to Fred Richards.
+REAL_VER=$(ar p google-talkplugin_current_${DEBARCH}.deb control.tar.gz | tar zxO ./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-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ echo "$PRGNAM-$REAL_VER-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
@@ -50,17 +59,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-case "$ARCH" in
- i?86) DEBARCH="i386" ;;
- x86_64) DEBARCH="amd64" ;;
- *) echo "Not supported" ; exit 1 ;;
-esac
-
set -eu
-# Get the real version, thanks to Fred Richards.
-REAL_VER=$(ar p google-talkplugin_current_${DEBARCH}.deb control.tar.gz | tar zxO ./control | grep Version | awk '{print $2}' | cut -d- -f1)
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG