summaryrefslogtreecommitdiffstats
path: root/games/uqm/uqm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/uqm/uqm.SlackBuild')
-rw-r--r--games/uqm/uqm.SlackBuild43
1 files changed, 20 insertions, 23 deletions
diff --git a/games/uqm/uqm.SlackBuild b/games/uqm/uqm.SlackBuild
index 28c298ab39..1e7ff55891 100644
--- a/games/uqm/uqm.SlackBuild
+++ b/games/uqm/uqm.SlackBuild
@@ -6,13 +6,21 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20201025 bkw: update build for new content pack 0.8.0. This mostly
+# has fixes for typos in the in-game text strings. The game engine
+# hasn't changed, so VERSION now has both versions. Also, moved
+# the binary to /usr/games where it belongs.
+
PRGNAM=uqm
-VERSION=${VERSION:-0.7.0}
+VERSION=${VERSION:-0.7.0+0.8.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-CONTENT=${PRGNAM}_content
-CONTVER=${CONTVER:-0.7.0}
+# Extract the tarball and content versions. If there's no + in
+# VERSION, both these will end up equal to VERSION. Otherwise use a +
+# to separate source and content versions (e.g. 0.7.0+0.8.0).
+SRCVER=$( echo $VERSION | sed 's,+.*,,' )
+CONTVER=$( echo $VERSION | sed 's,.*+,,' )
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -46,15 +54,12 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION-source.tgz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER-source.tgz
+cd $PRGNAM-$SRCVER
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# uqm uses a custom build.sh to configure and build the source.
# It's not a bad system, but it's interactive only, meaning I have
@@ -85,14 +90,6 @@ build_config() {
echo # ENTER at top-level menu = done
}
-
-if [ ! -e $CWD/$PRGNAM-$CONTVER-content.uqm ]; then
- echo "Error: $CONTENT not found! Please download the $CONTENT"
- echo " first (see the README), before attempting to build this."
- exit 1
-fi
-
-
build_config | sh build.sh uqm config
sed -i -e "s/-O3/$SLKCFLAGS/" -e '/LDFLAGS/s,-lz,-lz -lm,' build.vars
sh build.sh uqm
@@ -101,9 +98,9 @@ strip $PRGNAM
mkdir -p $PKG/usr/libexec/$PRGNAM
cp -a $PRGNAM $PKG/usr/libexec/$PRGNAM
-mkdir -p $PKG/usr/bin
-cat $PRGNAM-wrapper > $PKG/usr/bin/$PRGNAM
-chmod 0755 $PKG/usr/bin/$PRGNAM
+mkdir -p $PKG/usr/games
+cat $PRGNAM-wrapper > $PKG/usr/games/$PRGNAM
+chmod 0755 $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/$PRGNAM/content/{addons,packages}
cp content/version $PKG/usr/share/$PRGNAM/content
@@ -128,7 +125,7 @@ cp $PRGNAM.lsm AUTHORS BUGS COPYING ChangeLog Contributing README WhatsNew \
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s,@CONTVER@,$CONTVER," $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG