multimedia/google-talkplugin: Fix support for PRINT_PACKAGE_NAME

Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
This commit is contained in:
Heinz Wiesinger 2021-07-04 15:59:51 +02:00
parent 8ae3289c93
commit c97816b7b2

View file

@ -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