From c97816b7b2c51e61a2782cbeb6473149ad9db2de Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sun, 4 Jul 2021 15:59:51 +0200 Subject: multimedia/google-talkplugin: Fix support for PRINT_PACKAGE_NAME Signed-off-by: Heinz Wiesinger --- .../google-talkplugin/google-talkplugin.SlackBuild | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'multimedia') diff --git a/multimedia/google-talkplugin/google-talkplugin.SlackBuild b/multimedia/google-talkplugin/google-talkplugin.SlackBuild index baa07acb8c7f..53577d8d3cc2 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 -- cgit v1.2.3