diff options
Diffstat (limited to 'multimedia/huludesktop/huludesktop.SlackBuild')
-rw-r--r-- | multimedia/huludesktop/huludesktop.SlackBuild | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/multimedia/huludesktop/huludesktop.SlackBuild b/multimedia/huludesktop/huludesktop.SlackBuild index ccf89cec14..0793f5bd44 100644 --- a/multimedia/huludesktop/huludesktop.SlackBuild +++ b/multimedia/huludesktop/huludesktop.SlackBuild @@ -30,27 +30,34 @@ BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +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 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" exit 0 fi -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 - set -eu rm -rf $PKG |