summaryrefslogtreecommitdiff
path: root/games/warzone2100/warzone2100.SlackBuild
diff options
context:
space:
mode:
authorMatthew Fillpot <mfillpot@gmail.com>2010-05-13 00:27:30 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-13 00:27:30 +0200
commitf3c2a47f59528ec72553d0b0e77323feca606b52 (patch)
treeeeef29a0ae8e4b1f792b4b57f7997f5183de3136 /games/warzone2100/warzone2100.SlackBuild
parente627ec8492b6a5c3fd13f1a16f1db8a50deed6a7 (diff)
downloadslackbuilds-f3c2a47f59528ec72553d0b0e77323feca606b52.tar.gz
games/warzone2100: Updated for version 2.3_beta4
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}