games/worldofpadman: ARCH->i586, add SRCARCH.

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-16 20:22:32 +01:00 committed by Willy Sudiarto Raharjo
parent d4cab95445
commit 001594d2a1
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 13 additions and 5 deletions

View file

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

View file

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