aboutsummaryrefslogtreecommitdiff
path: root/games/etlegacy/etlegacy.SlackBuild
diff options
context:
space:
mode:
authorD Woodfall <dave@slackbuilds.org>2023-05-16 20:20:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-05-20 11:17:57 +0700
commitd4cab9544581201249a4d9991fb2d8eda1863434 (patch)
treeecdb078f2c4e984f9d4083629c1fffdd80c0d9d7 /games/etlegacy/etlegacy.SlackBuild
parentcf4ad915ea872f485909e38dfe0795c9e30210f1 (diff)
games/etlegacy: ARCH->i586, add SRCARCH.
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/etlegacy/etlegacy.SlackBuild')
-rw-r--r--games/etlegacy/etlegacy.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/games/etlegacy/etlegacy.SlackBuild b/games/etlegacy/etlegacy.SlackBuild
index 314d0e85c8871..9c74ae4ca0486 100644
--- a/games/etlegacy/etlegacy.SlackBuild
+++ b/games/etlegacy/etlegacy.SlackBuild
@@ -31,12 +31,20 @@ PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i*86) ARCH=i386 ;;
- x86_64) ARCH=x86_64 ;;
- *) echo "$ARCH architecture not supported. This script is available only for i386 and x86_64." ;;
+ i?86) ARCH=i586 ;;
+ *) ARCH=$( uname -m ) ;;
esac
fi
+if [ "$ARCH" = "x86_64" ]; then
+ SRCARCH=$ARCH
+elif [[ $ARCH =~ i?86 ]]; then
+ SRCARCH=i386
+else
+ echo "$ARCH architecture is unsupported." >/dev/stderr
+ exit 1
+fi
+
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -51,8 +59,8 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG/usr/share $OUTPUT
cd $PKG/usr/share
-tar xvf $CWD/$PRGNAM-v$VERSION-$ARCH.tar.?z
-mv $PRGNAM-v$VERSION-$ARCH $PRGNAM
+tar xvf $CWD/$PRGNAM-v$VERSION-$SRCARCH.tar.?z
+mv $PRGNAM-v$VERSION-$SRCARCH $PRGNAM
cd $PRGNAM
chown -R root:root .
find -L . \