summaryrefslogtreecommitdiffstats
path: root/games/chocolate-doom/chocolate-doom.SlackBuild
diff options
context:
space:
mode:
author B. Watson2017-02-28 23:15:25 +0100
committer Willy Sudiarto Raharjo2017-03-04 01:26:33 +0100
commit273c4889812c51a75df2af43c5747a33e97e07ce (patch)
tree1d2d1d8d9697417a75e2518dd1888c7c02bf1a84 /games/chocolate-doom/chocolate-doom.SlackBuild
parent33b2839bd38e4605be984b7b8def76d107d59cd8 (diff)
downloadslackbuilds-273c4889812c51a75df2af43c5747a33e97e07ce.tar.gz
games/chocolate-doom: Allow building 3.0.0-beta1.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/chocolate-doom/chocolate-doom.SlackBuild')
-rw-r--r--games/chocolate-doom/chocolate-doom.SlackBuild21
1 files changed, 18 insertions, 3 deletions
diff --git a/games/chocolate-doom/chocolate-doom.SlackBuild b/games/chocolate-doom/chocolate-doom.SlackBuild
index 4e71e7160e..bc77a3ab72 100644
--- a/games/chocolate-doom/chocolate-doom.SlackBuild
+++ b/games/chocolate-doom/chocolate-doom.SlackBuild
@@ -6,6 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20170228 bkw:
+# - Allow building 3.0.0-beta1 (but VERSION is still 2.3.0, and is
+# still built the same, so BUILD is still 1). See BETA.txt.
+
# 20170111 bkw:
# - update for v2.3.0
# - use upstream's .desktop files for heretic/hexen/strife, now that
@@ -49,12 +53,21 @@ fi
set -e
+# Beta versions have a - in the filename, but Slackware needs version
+# numbers with no - in them. If the user wants to build 3.0.0-beta1,
+# he needs to set VERSION=3.0.0_beta1 and the script will figure out
+# the filename.
+case "$VERSION" in
+ *_*) REALVER=${VERSION//_/-} ;;
+ *) REALVER=${VERSION} ;;
+esac
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$REALVER $PRGNAM-$PRGNAM-$REALVER
+tar xvf $CWD/$PRGNAM-$REALVER.tar.gz || tar xvf $CWD/$PRGNAM-$PRGNAM-$REALVER.tar.gz
+cd $PRGNAM-$REALVER || cd $PRGNAM-$PRGNAM-$REALVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -62,6 +75,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+[ -x configure ] || sh autogen.sh
+
# NB: Upstream uses --docdir in a weird way: docs for chocolate-doom
# go in $docdir, the others go in e.g. "$docdir/../chocolate-hexen/".
CFLAGS="$SLKCFLAGS" \