aboutsummaryrefslogtreecommitdiff
path: root/games/nexuiz/nexuiz.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/nexuiz/nexuiz.SlackBuild')
-rw-r--r--games/nexuiz/nexuiz.SlackBuild44
1 files changed, 28 insertions, 16 deletions
diff --git a/games/nexuiz/nexuiz.SlackBuild b/games/nexuiz/nexuiz.SlackBuild
index f8f12ca396a7..8f7192de8df2 100644
--- a/games/nexuiz/nexuiz.SlackBuild
+++ b/games/nexuiz/nexuiz.SlackBuild
@@ -2,6 +2,9 @@
# Slackware build script for Nexuiz
+# Now maintained by B. Watson <yalhcru@gmail.com>, please don't bother
+# Chess with questions about this build (bother me instead)
+
# Copyright 2008-2009 Chess Griffin <chess@chessgriffin.com>
# All rights reserved.
#
@@ -23,7 +26,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nexuiz
-VERSION=${VERSION:-2.5.1}
+VERSION=${VERSION:-2.5.2}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -36,21 +39,31 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+ SRCARCH="686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
+ SRCARCH="686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ SRCARCH="x86_64"
fi
-set -e # Exit on most errors
+set -e
+
+SRCVER=$( echo $VERSION | tr -d . )
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf Nexuiz
-unzip -o $CWD/nexuiz-251.zip
+
+# All the -x stuff saves us 120MB of space in /tmp, during the build.
+# Why extract the windows and mac binaries, if we're not going to use them?
+unzip -o $CWD/nexuiz-$SRCVER.zip \
+ -x 'Nexuiz/nexuiz-osx-*' '*.exe' '*.dll' 'Nexuiz/Nexuiz-SDL.app/*' \
+ 'Nexuiz/Nexuiz.app/*' 'Nexuiz/extra/*' 'Nexuiz/sources/*'
cd Nexuiz
chown -R root:root .
find . \
@@ -59,13 +72,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
-)
-
install -D -m 0644 $CWD/nexuiz-glx.desktop \
$PKG/usr/share/applications/nexuiz-glx.desktop
install -D -m 0644 $CWD/nexuiz-sdl.desktop \
@@ -77,22 +83,24 @@ cp $CWD/*.png $PKG/usr/share/pixmaps
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -R ./Docs/* $PKG/usr/doc/$PRGNAM-$VERSION/
cp gpl.txt $PKG/usr/doc/$PRGNAM-$VERSION
+# Include server scripts as docs:
+cp -R server $PKG/usr/doc/$PRGNAM-$VERSION/server
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
mkdir -p $PKG/usr/share/games/nexuiz
cp -R data $PKG/usr/share/games/nexuiz
+cp -R havoc $PKG/usr/share/games/nexuiz/havoc
find $PKG/usr/share/games/nexuiz -type f -exec chmod 0644 {} \;
-cp nexuiz-* $PKG/usr/share/games/nexuiz
-rm $PKG/usr/share/games/nexuiz/*.exe
-rm $PKG/usr/share/games/nexuiz/nexuiz-osx-dedicated
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+# The binaries are already stripped.
+# Compiled binaries don't belong under /usr/share (saith the FHS), but
+# this isn't worth changing IMO, it would require patching all the run scripts.
+cp nexuiz-linux-$SRCARCH* nexuiz-linux-*.sh $PKG/usr/share/games/nexuiz
chmod 755 $PKG/usr/share/games/nexuiz/*
mkdir -p $PKG/usr/games
+
# The launchers for the sdl and glx binaries automatically detect
# the architecture. The launchers for the dedicated server do not.
cp $CWD/nexuiz-glx $PKG/usr/games/
@@ -104,5 +112,9 @@ else
fi
chmod 755 $PKG/usr/games/nexuiz*
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}