summaryrefslogtreecommitdiff
path: root/games/darkplaces/darkplaces.SlackBuild
diff options
context:
space:
mode:
authorM.Dinslage <daedra1980@gmail.com>2011-07-24 17:15:14 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-08-11 20:23:15 -0300
commita1aacd741839f091a86be05a70096c1df5561ca7 (patch)
tree168c23bf78519c799c5dbfb53944601368162e04 /games/darkplaces/darkplaces.SlackBuild
parentcd7a43e983955074f6ae7ac2ebe9dcc18f071315 (diff)
downloadslackbuilds-a1aacd741839f091a86be05a70096c1df5561ca7.tar.gz
games/darkplaces: Updated for version 20110628.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'games/darkplaces/darkplaces.SlackBuild')
-rw-r--r--games/darkplaces/darkplaces.SlackBuild38
1 files changed, 17 insertions, 21 deletions
diff --git a/games/darkplaces/darkplaces.SlackBuild b/games/darkplaces/darkplaces.SlackBuild
index df4960e9aa..cdf4fa3add 100644
--- a/games/darkplaces/darkplaces.SlackBuild
+++ b/games/darkplaces/darkplaces.SlackBuild
@@ -3,9 +3,11 @@
# Slackware build script for darkplaces
# Written by M.Dinslage (daedra1980@gmail.com)
+# Big thanks to Robby Workman for tweaks and
+# various script cleanups.
PRGNAM=darkplaces
-VERSION=${VERSION:-20100408}
+VERSION=${VERSION:-20110628}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -22,8 +24,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SRCDIR=${SRCDIR:-engine20100408}
-SRCVER=${SRCVER:-enginesource20100408}
+SRCDIR=${SRCDIR:-engine20110628}
+SRCVER=${SRCVER:-enginesource20110628}
MODVER=${MODVER:-darkplacesmod20080808}
# By default we won't add the darkplaces game mods
@@ -32,6 +34,9 @@ DPMOD=${DPMOD:-"NO"}
# Pass SOURCE=YES if you want to build you binaries from source
SOURCE=${SOURCE:-"NO"}
+# By default application launcher will use opengl version
+SDL=${SDL:-"NO"}
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -47,7 +52,7 @@ else
# might not work at all, but we could try :)
SLKCFLAGS="-O2"
BINARCH=$ARCH
- SOURCE="yes"
+ SOURCE="YES"
fi
set -e
@@ -58,14 +63,9 @@ cd $TMP
rm -rf $PRGNAM
mkdir -p $PRGNAM
cd $PRGNAM
-rm -rf $PRGNAM$SRCDIR
+rm -rf $PRGNAM$SRCDIR
unzip $CWD/$PRGNAM$SRCDIR.zip
unzip $PRGNAM$SRCVER.zip # this is in the first zip file
-
-#SRCDIR=${SRCDIR:-engine20100408}
-#SRCVER=${SRCVER:-enginesource20100408}
-#MODVER=${MODVER:-darkplacesmod20080808}
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -73,16 +73,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Let the Makefile set its own flags;
+# Let the Makefile set its own flags;
# this way the precompiled and from-source binaries use the same flags
-#CFLAGS="$SLKCFLAGS" \
-#CXXFLAGS="$SLKCFLAGS" \
-#LDFLAGS="$SLKLDFLAGS" \
-
-SRCDIR=${SRCDIR:-engine20100408}
-SRCVER=${SRCVER:-enginesource20100408}
-MODVER=${MODVER:-darkplacesmod20080808}
-
if [ "$SOURCE" != "NO" ]; then
cd $PRGNAM
make release
@@ -111,10 +103,14 @@ done
# Add application launcher
mkdir -p $PKG/usr/share/{applications,pixmaps}
-cat $CWD/$PRGNAM-glx.desktop > $PKG/usr/share/applications/$PRGNAM-glx.desktop
-cat $CWD/$PRGNAM-sdl.desktop > $PKG/usr/share/applications/$PRGNAM-sdl.desktop
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/quake.png > $PKG/usr/share/pixmaps/quake.png
+# Make application launcher execute SDL version if requested.
+if [ "$SDL" != "NO" ]; then
+ sed -i 's,darkplaces-glx,darkplaces-sdl,g' $PKG/usr/share/applications/$PRGNAM.desktop
+fi
+
if [ "$DPMOD" != "NO" ]; then
unzip $CWD/$MODVER.zip
chown -R root:root dpmod