system/rar: Fix ARCH section.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
D Woodfall 2023-05-17 00:03:13 +01:00 committed by Willy Sudiarto Raharjo
parent c6c6a71b31
commit 75ed378a38
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 17 additions and 15 deletions

View File

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