aboutsummaryrefslogtreecommitdiff
path: root/system/rar
diff options
context:
space:
mode:
authorD Woodfall <dave@slackbuilds.org>2023-05-17 00:03:13 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-20 11:17:59 +0700
commit75ed378a38c5e38dd5ce6e878358102aca5a2f7c (patch)
treede1bb2f03d4e301a7eae3f7e6f83a3d8306a22a3 /system/rar
parentc6c6a71b3180f2bba02bc71543423bd25f811fce (diff)
system/rar: Fix ARCH section.
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/rar')
-rw-r--r--system/rar/rar.SlackBuild32
1 files changed, 17 insertions, 15 deletions
diff --git a/system/rar/rar.SlackBuild b/system/rar/rar.SlackBuild
index 089c6bdb8da7b..7e4d692908772 100644
--- a/system/rar/rar.SlackBuild
+++ b/system/rar/rar.SlackBuild
@@ -14,11 +14,23 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-case "$( uname -m )" in
- i?86) ARCH=i386 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
-esac
+# 2023-05-17 DW: move all the ARCH stuff above PRINT_PACKAGE_NAME
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ x64FIX="x64-"
+elif [[ $ARCH =~ i?86 ]]; then
+ LIBDIRSUFFIX=""
+else
+ printf "\n$ARCH is not supported...\n\n" ; exit 1
+fi
# 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
@@ -37,16 +49,6 @@ UNRAR=${UNRAR:-no} # disabled by default since unrar is available on SBo
set -e
-if [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
- x64FIX="x64-"
-elif [ "$ARCH" = "i386" ]; then
- ARCH=i386
- LIBDIRSUFFIX=""
-else
- printf "\n$ARCH is not supported...\n\n" ; exit 1
-fi
-
rm -rf $TMP/$PRGNAM $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP