aboutsummaryrefslogtreecommitdiff
path: root/games/dhewm3/dhewm3.SlackBuild
diff options
context:
space:
mode:
authorHunter Sezen <orbea@fredslev.dk>2018-12-22 01:56:02 -0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-12-22 01:56:02 -0900
commit18cde3391c8b4ff7385b6942ea2d055cfbf01b37 (patch)
tree7764cc5c9098ca2d44b1df0b462ec476ecf52484 /games/dhewm3/dhewm3.SlackBuild
parentcdc5c40e528cea87f632c9ad186b2e8c9327ff52 (diff)
games/dhewm3: Updated for version 1.5.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/dhewm3/dhewm3.SlackBuild')
-rw-r--r--games/dhewm3/dhewm3.SlackBuild26
1 files changed, 14 insertions, 12 deletions
diff --git a/games/dhewm3/dhewm3.SlackBuild b/games/dhewm3/dhewm3.SlackBuild
index 922448127d5f4..683b4bcf0ff37 100644
--- a/games/dhewm3/dhewm3.SlackBuild
+++ b/games/dhewm3/dhewm3.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for dhewm3
-# Copyright 2016 Hunter Sezen California, USA
+# Copyright 2016, 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=dhewm3
-VERSION=${VERSION:-1.4.1}
+VERSION=${VERSION:-1.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,13 +54,13 @@ else
LIBDIRSUFFIX=""
fi
-set -e
+set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -69,11 +69,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-BASE=${BASE:-yes} CORE=${CORE:-yes} D3XP=${D3XP:-yes} SERVER=${SERVER:-no}
-if [ "${BASE:-no}" = "no" ]; then base="-DBASE:BOOL=OFF"; else base=""; fi
-if [ "${CORE:-no}" = "no" ]; then core="-DCORE:BOOL=OFF"; else core=""; fi
-if [ "${D3XP:-no}" = "no" ]; then d3xp="-DD3XP:BOOL=OFF"; else d3xp=""; fi
-if [ "${SERVER:-yes}" = "yes" ]; then server="-DDEDICATED:BOOL=ON"; else server=""; fi
+[ "${BASE:=ON}" != ON ] && BASE=OFF
+[ "${CORE:=ON}" != ON ] && CORE=OFF
+[ "${D3XP:=ON}" != ON ] && D3XP=OFF
+[ "${SERVER:=OFF}" != OFF ] && SERVER=ON
mkdir -p neo/build
cd neo/build
@@ -83,7 +82,10 @@ cd neo/build
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
-DCMAKE_INSTALL_DATAROOTDIR=share/games \
- $base $core $d3xp $server \
+ -DBASE=$BASE \
+ -DCORE=$CORE \
+ -DD3XP=$D3XP \
+ -DDEDICATED=$SERVER \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -91,8 +93,8 @@ cd ../..
mkdir -p $PKG/usr/share/games/$PRGNAM
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION