diff options
author | D Woodfall <dave@slackbuilds.org> | 2023-05-16 20:22:32 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-20 11:17:58 +0700 |
commit | 001594d2a17a90b01d4dafc83dffbf3f3e0d6fc5 (patch) | |
tree | ae04270650f191c7df7ff16ac6fbabf34545fd51 /games | |
parent | d4cab9544581201249a4d9991fb2d8eda1863434 (diff) |
games/worldofpadman: ARCH->i586, add SRCARCH.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/worldofpadman/worldofpadman.SlackBuild | 16 | ||||
-rw-r--r-- | games/worldofpadman/wrapper.sh | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/games/worldofpadman/worldofpadman.SlackBuild b/games/worldofpadman/worldofpadman.SlackBuild index 42f45c58cb591..29b81315e55eb 100644 --- a/games/worldofpadman/worldofpadman.SlackBuild +++ b/games/worldofpadman/worldofpadman.SlackBuild @@ -43,12 +43,20 @@ PATCHVER=$VERSION if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i386 ;; - x86_64) ARCH=x86_64 ;; - *) echo "Architecture $(uname -m) not suported" && exit 1 ;; + 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 @@ -121,7 +129,7 @@ cat $CWD/worldofpadman.desktop > $PKG/usr/share/applications/worldofpadman.deskt # change the .desktop file for different ARCHes. mkdir -p $PKG/usr/games for exe in wop wopded; do - sed -e "s,@ARCH@,$ARCH,g" -e "s,@EXE@,$exe,g" \ + sed -e "s,@SRCARCH@,$SRCARCH,g" -e "s,@EXE@,$exe,g" \ < $CWD/wrapper.sh \ > $PKG/usr/games/$exe chmod 0755 $PKG/usr/games/$exe diff --git a/games/worldofpadman/wrapper.sh b/games/worldofpadman/wrapper.sh index 60ea1304af4d5..cc65e1d62bce1 100644 --- a/games/worldofpadman/wrapper.sh +++ b/games/worldofpadman/wrapper.sh @@ -7,4 +7,4 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. -exec /opt/worldofpadman/@EXE@.@ARCH@ "$@" +exec /opt/worldofpadman/@EXE@.@SRCARCH@ "$@" |