aboutsummaryrefslogtreecommitdiff
path: root/games/wesnoth/wesnoth.SlackBuild
diff options
context:
space:
mode:
authorMichiel van Wessem <michiel@slackbuilds.org>2010-05-13 00:27:31 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-13 00:27:31 +0200
commitcc2fe50173b4f76d868c408089f983b89460558b (patch)
tree5469dd3dc5d111d9f0d70ac1bb39306fb84c0404 /games/wesnoth/wesnoth.SlackBuild
parentf3c2a47f59528ec72553d0b0e77323feca606b52 (diff)
games/wesnoth: Updated for version 1.7.11
Diffstat (limited to 'games/wesnoth/wesnoth.SlackBuild')
-rw-r--r--games/wesnoth/wesnoth.SlackBuild41
1 files changed, 30 insertions, 11 deletions
diff --git a/games/wesnoth/wesnoth.SlackBuild b/games/wesnoth/wesnoth.SlackBuild
index 1282fa3cf5ad..b309ee0d2e36 100644
--- a/games/wesnoth/wesnoth.SlackBuild
+++ b/games/wesnoth/wesnoth.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# SlackBuilid script for "Battle of Wesnoth".
+# SlackBuilid script for "Battle of Wesnoth".
# Copyright 2007-2009 Michiel van Wessem, Manchester, United Kingdom
# All rights reserved.
@@ -25,7 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=wesnoth
-VERSION=${VERSION:-1.6.1}
+VERSION=${VERSION:-1.7.11}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,31 +35,50 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+SERVER=${SERVER:-"no"}
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
+if [ "$SERVER" = "yes" ]; then
+ BUILDSERVER="\
+ --enable-campaign-server \
+ --enable-bandwidth-monitor \
+ --with-server-uid=${SERVER_UID:-"229"} \
+ --with-server-gid=${server_GID:-"229"} "
+elif [ "$SERVER" = "no" ]; then
+ BUILDSERVER="\
+ --disable-campaign-server \
+ --disable-bandwidth-monitor "
+fi
+
set -e # Exit on all errors.
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \;
+
+# generate configure. While wesnoth now supports scons (yuck) and cmake. Neither
+# really works. Until the point that upstreams decide what they want to use, we're
+# going to stick with autotools.
+./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -70,20 +89,20 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-icondir=/usr/share/pixmaps \
--enable-python \
--enable-editor \
--enable-tools \
+ --enable-server \
--with-kde \
--with-gnome \
+ $BUILDSERVER \
--disable-debug \
--build=$ARCH-slackware-linux
-make
+make
make install-strip DESTDIR=$PKG
-# Let's not pollute the toplevel /usr/share/icons
-mv $PKG/usr/share/icons $PKG/usr/share/pixmaps
-
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
@@ -99,4 +118,4 @@ 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}