diff options
author | D Woodfall <dave@slackbuilds.org> | 2023-05-16 20:41:47 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-20 11:17:58 +0700 |
commit | cecffc8b3189e57a18315f56c812b0fcf6d9ca63 (patch) | |
tree | 2d8133a6e51a87aec78ee363f3120c4105d8a16d /multimedia/huludesktop | |
parent | 5ae2dab06fe36732c6c4c1a632d3cbebbbcb3d7b (diff) |
multimedia/huludesktop: Move/modify ARCH and move DEBARCH section.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/huludesktop')
-rw-r--r-- | multimedia/huludesktop/huludesktop.SlackBuild | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/multimedia/huludesktop/huludesktop.SlackBuild b/multimedia/huludesktop/huludesktop.SlackBuild index 65af8535d68c9..0793f5bd44614 100644 --- a/multimedia/huludesktop/huludesktop.SlackBuild +++ b/multimedia/huludesktop/huludesktop.SlackBuild @@ -30,18 +30,28 @@ BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -REAL_VER=$(ar p ${PRGNAM}_${DEBARCH}.deb control.tar.gz | tar zxO ./control \ - | grep Version | awk '{print $2}' | cut -d- -f1) - TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -case "$(uname -m)" in - i?86) DEBARCH="i386" ; ARCH=i386 ;; - x86_64) DEBARCH="amd64" ; ARCH=x86_64 ;; - *) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;; -esac +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ "$ARCH" = "x86_64" ]; then + DEBARCH="amd64" +elif [[ $ARCH =~ i?86 ]]; then + DEBARCH="i386" +else + echo "$ARCH architecture is unsupported." >/dev/stderr + exit 1 +fi + +REAL_VER=$(ar p ${PRGNAM}_${DEBARCH}.deb control.tar.gz | tar zxO ./control \ + | grep Version | awk '{print $2}' | cut -d- -f1) if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$REAL_VER-$ARCH-$BUILD$TAG.$PKGTYPE" |