summaryrefslogtreecommitdiff
path: root/games/warzone2100/warzone2100.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/warzone2100/warzone2100.SlackBuild')
-rw-r--r--games/warzone2100/warzone2100.SlackBuild39
1 files changed, 24 insertions, 15 deletions
diff --git a/games/warzone2100/warzone2100.SlackBuild b/games/warzone2100/warzone2100.SlackBuild
index 487ccb6d4c..0df5740039 100644
--- a/games/warzone2100/warzone2100.SlackBuild
+++ b/games/warzone2100/warzone2100.SlackBuild
@@ -2,7 +2,7 @@
# SlackBuild script for Warzone 2100
-# Copyright 2008 Andrew "ccfreak2k" Waters
+# Copyright 2010 Matthew "mfillpot" Fillpot
# 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=warzone2100
-VERSION=${VERSION:-2.0.10}
+VERSION=${VERSION:-2.3_beta4}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -34,43 +34,52 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ echo "Unrecognized architecture type! Check the script: $0"
+ exit 1
fi
+set -e
+
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
- ./configure \
+./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-data=yes \
--with-distributor=Slackware \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
-make || exit
+make
make install-strip DESTDIR=$PKG
# Let's not pollute the themed icon directory
mv $PKG/usr/share/icons $PKG/usr/share/pixmaps
-# --docdir= above works :) but leaves out a few things we want...
-cp COMPILE INSTALL TODO $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+# --docdir= above works :)
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}