aboutsummaryrefslogtreecommitdiff
path: root/games/Tempus-Irae/Tempus-Irae.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/Tempus-Irae/Tempus-Irae.SlackBuild')
-rw-r--r--games/Tempus-Irae/Tempus-Irae.SlackBuild31
1 files changed, 18 insertions, 13 deletions
diff --git a/games/Tempus-Irae/Tempus-Irae.SlackBuild b/games/Tempus-Irae/Tempus-Irae.SlackBuild
index 50925fd80128..878dd9bdf3fb 100644
--- a/games/Tempus-Irae/Tempus-Irae.SlackBuild
+++ b/games/Tempus-Irae/Tempus-Irae.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Tempus Irae
-# Copyright 2015 Hunter Sezen California, USA
+# Copyright 2015, 2018 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=Tempus-Irae
-VERSION=${VERSION:-20060615} # Last modified date from the zipfile's http header
+VERSION=${VERSION:-1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -34,26 +34,31 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-set -e
+set -eu
+
# install gamedata in opt instead of usr
-OPT=${OPT:-no}
-if [ "${OPT:-yes}" == "yes" ]; then
- DATA="/opt/AlephOne"
+if [ "${OPT:-0}" != 0 ]; then
+ DATA='/opt/AlephOne'
else
- DATA="/usr/share/AlephOne/gamedata"
+ DATA='/usr/share/AlephOne/gamedata'
fi
-ZIPNAME=$(echo $PRGNAM | tr - _)
+ZIPNAME=$(printf %s $PRGNAM | tr - _)
ZIPFILE=$ZIPNAME.zip
-WRAPPER=$(echo $PRGNAM | tr '[A-Z]' '[a-z]')
+WRAPPER=$(printf %s $PRGNAM | tr 'A-Z' 'a-z')
DATADIR=$PKG$DATA
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG $OUTPUT $DATADIR
cd $TMP
-mkdir -p $DATADIR
unzip $CWD/$ZIPFILE -d $DATADIR
+if [ -f $CWD/Tempus_Premium_Landscapes.zip ]; then
+ unzip $CWD/Tempus_Premium_Landscapes.zip -d $DATADIR
+ cp -a $DATADIR/Tempus_Premium_Landscapes/* $DATADIR/$ZIPNAME
+ rm -r $DATADIR/Tempus_Premium_Landscapes
+fi
+
chown -R root:root $DATADIR
# NB: the usual find predicate is different (zipfile stores +x permissions
@@ -76,11 +81,11 @@ find $PKG/usr/games -perm 644 -exec chmod 755 {} \;
mkdir -p $PKG/usr/share/applications
cat > $PKG/usr/share/applications/$WRAPPER.desktop <<EOF
[Desktop Entry]
-Name=$(echo $PRGNAM | tr - " ")
+Name=$(printf %s $PRGNAM | tr - " ")
Exec=$WRAPPER
Icon=alephone
Type=Application
-Comment=$(echo $PRGNAM | tr - " ") (first-person shooter game)
+Comment=$(printf %s $PRGNAM | tr - " ") (first-person shooter game)
Categories=Game;ActionGame;
EOF