diff options
author | D Woodfall <dave@slackbuilds.org> | 2023-05-16 20:18:32 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-20 11:17:57 +0700 |
commit | cf4ad915ea872f485909e38dfe0795c9e30210f1 (patch) | |
tree | 7d41e252a936848212878814f202977c0f3b50a9 /games/UrbanTerror | |
parent | 01d7a5348398207833b9f0bad2f6f534ee09f992 (diff) |
games/UrbanTerror: Fix ARCH section and symlinks.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/UrbanTerror')
-rw-r--r-- | games/UrbanTerror/UrbanTerror.SlackBuild | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/games/UrbanTerror/UrbanTerror.SlackBuild b/games/UrbanTerror/UrbanTerror.SlackBuild index a3092d25b521a..8a208e6928568 100644 --- a/games/UrbanTerror/UrbanTerror.SlackBuild +++ b/games/UrbanTerror/UrbanTerror.SlackBuild @@ -31,12 +31,20 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +# ARCH/EXEC simplified and moved together +# DW 2023-05-16 02:03:15 +0100 if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac + ARCH=$( uname -m ) +fi + +if [ "$ARCH" = "x86_64" ]; then + EXEC="x86_64" +elif [[ $ARCH =~ i?86 ]]; then + EXEC="i386" + ARCH="i586" +else + echo "$ARCH architecture is unsupported" >/dev/stderr + exit 1 fi # If the variable PRINT_PACKAGE_NAME is set, then this script will report what @@ -51,13 +59,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -LIBDIRSUFFIX= -if [ "$ARCH" = "i386" ]; then - EXEC="i386" -elif [ "$ARCH" = "x86_64" ]; then - EXEC="x86_64" -fi - CLIENT_EXEC=${CLIENT_EXEC:-Quake3-UrT.$EXEC} SERVER_EXEC=${SERVER_EXEC:-Quake3-UrT-Ded.$EXEC} @@ -80,8 +81,10 @@ find -L . \ # Create symlinks in /usr/games mkdir -p $PKG/usr/games cd $PKG/usr/games - ln -sf /usr/share/games/UrbanTerror43/$CLIENT_EXEC urbanterror - ln -sf /usr/share/games/UrbanTerror43/$SERVER_EXEC urbanterror_server +# changed to relative paths +# DW 2023-05-16 02:04:30 +0100 + ln -sf ../share/games/UrbanTerror43/$CLIENT_EXEC urbanterror + ln -sf ../share/games/UrbanTerror43/$SERVER_EXEC urbanterror_server cd - # Add a menu entry and icon @@ -90,16 +93,18 @@ cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop cat $CWD/q3urt.png > $PKG/usr/share/pixmaps/q3urt.png # Remove unused files from the package - cd $PKG/usr/share/games/UrbanTerror43 - rm -f *.exe - rm -rf Quake3-UrT.app -[ "$EXEC" != "i386" ] && rm -f *.i386 -[ "$EXEC" != "x86_64" ] && rm -f *.x86_64 - cd q3ut4 - rm *.cfg - rm *.txt - rm *.doc - chmod -x *.pk3 +cd $PKG/usr/share/games/UrbanTerror43 +rm -f *.exe +rm -rf Quake3-UrT.app +# a bit easier to parse than a negative test? +# DW 2023-05-16 02:03:15 +0100 +[ "$EXEC" = "x86_64" ] && rm -vf *.i386 +[ "$EXEC" = "i386" ] && rm -vf *.x86_64 +cd q3ut4 +rm *.cfg +rm *.txt +rm *.doc +chmod -x *.pk3 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION install -m 644 $CWD/docs/* $PKG/usr/doc/$PRGNAM-$VERSION/ |