aboutsummaryrefslogtreecommitdiff
path: root/games/tuxpuck/tuxpuck.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/tuxpuck/tuxpuck.SlackBuild')
-rw-r--r--games/tuxpuck/tuxpuck.SlackBuild24
1 files changed, 15 insertions, 9 deletions
diff --git a/games/tuxpuck/tuxpuck.SlackBuild b/games/tuxpuck/tuxpuck.SlackBuild
index 3493bcd53bf4..716514bc8d11 100644
--- a/games/tuxpuck/tuxpuck.SlackBuild
+++ b/games/tuxpuck/tuxpuck.SlackBuild
@@ -3,13 +3,12 @@
# Slackware build script for tuxpuck
# Written by Erik Hanson erik@slackbuilds.org
-# Modified by the SlackBuilds.org project
-
PRGNAM=tuxpuck
VERSION=0.8.2
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -19,6 +18,8 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
rm -rf $PKG
@@ -30,13 +31,18 @@ cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" make || exit 1
-make install DESTDIR=$PKG || exit 1
+# Fix man page and buffer overflow:
+patch -p1 < $CWD/tuxpuck_0.8.2_fixes.diff || exit 1
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+# Use our SLKCFLAGS:
+for i in Makefile data/Makefile utils/Makefile ; do
+ sed -i "s/-Wall/-Wall $SLKCFLAGS/" $i
+done
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+strip --strip-unneeded $PKG/usr/bin/tuxpuck
+gzip -9 $PKG/usr/man/man6/tuxpuck.6
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp COPYING readme.txt $PKG/usr/doc/$PRGNAM-$VERSION