mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
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:
parent
d4cab95445
commit
001594d2a1
2 changed files with 13 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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@ "$@"
|
||||
|
|
Loading…
Reference in a new issue