summaryrefslogtreecommitdiff
path: root/games/wesnoth/wesnoth.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/wesnoth/wesnoth.SlackBuild')
-rw-r--r--games/wesnoth/wesnoth.SlackBuild60
1 files changed, 40 insertions, 20 deletions
diff --git a/games/wesnoth/wesnoth.SlackBuild b/games/wesnoth/wesnoth.SlackBuild
index afb0c91bf5..b42ea7ae56 100644
--- a/games/wesnoth/wesnoth.SlackBuild
+++ b/games/wesnoth/wesnoth.SlackBuild
@@ -1,12 +1,31 @@
#!/bin/sh
# SlackBuilid script for "Battle of Wesnoth".
-# Written by: Michiel van Wessem (BP{k}) <michiel@slackbuilds.org>
-# Modified by the SlackBuilds.org project
+# Copyright 2007-2008 Michiel van Wessem, Manchester, United Kingdom
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NAME=wesnoth
-VERSION=1.4
+VERSION=${VERSION:-1.4.5}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,21 +35,22 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$NAME
OUTPUT=${OUTPUT:-/tmp}
-# The documentation we want to include
-DOCFILES="ABOUT-NLS COPYING INSTALL MANUAL* README changelog copyright"
-
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$NAME-$VERSION
-cd $TMP || exit 1
-tar xvf $CWD/$NAME-$VERSION.tar.bz2 || exit 1
-cd $NAME-$VERSION || exit 1
+cd $TMP
+tar xvf $CWD/$NAME-$VERSION.tar.bz2
+cd $NAME-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -40,7 +60,8 @@ find . \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
- ./configure --prefix=/usr \
+./configure \
+ --prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--docdir=/usr/doc/$NAME-$VERSION \
@@ -48,23 +69,22 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-python \
--enable-editor \
--enable-tools \
- --disable-debug \
--with-kde \
--with-gnome \
- --program-prefix="" \
- --program-suffix="" \
- || exit 1
+ --disable-debug \
+ --build=$ARCH-slackware-linux
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make
+make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
+( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a $DOCFILES $PKG/usr/doc/$NAME-$VERSION
+cp -a ABOUT-NLS COPYING INSTALL README changelog copyright \
+ $PKG/usr/doc/$NAME-$VERSION
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
mkdir $PKG/install