diff options
Diffstat (limited to 'games/xbill/xbill.SlackBuild')
-rw-r--r-- | games/xbill/xbill.SlackBuild | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/games/xbill/xbill.SlackBuild b/games/xbill/xbill.SlackBuild index bfab3c2913..3994de1e14 100644 --- a/games/xbill/xbill.SlackBuild +++ b/games/xbill/xbill.SlackBuild @@ -1,7 +1,8 @@ #!/bin/sh # Slackware build script for XBill -# Written by Menno E. Duursma <druiloor@zonnet.nl> + +# Written by Menno Duursma <druiloor@zonnet.nl> # This program is free software. It comes without any warranty. # Granted WTFPL, Version 2, as published by Sam Hocevar. See @@ -12,7 +13,7 @@ PRGNAM=xbill VERSION=${VERSION:-2.1} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -20,13 +21,19 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# On capability enabled filesystems this may be enabled, +# i'd guess if this box runs x-apps, it probably has... +FCAPS=${FCAPS:-true} + 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 -set -e +set -e # Exit on most errors rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -59,7 +66,7 @@ make install DESTDIR=$PKG mv $PKG/var/games/xbill/scores $PKG/var/games/xbill/scores.new # Do a little trick to disallow cheating, hopefully -# Note: we do the privs stuff in doinst.sh for target system +# Note: we do the privs stuff below at doinst.sh cp -a $PKG/usr/bin/xbill $PKG/usr/bin/xbill-bin gcc -Wall $SLKCFLAGS $CWD/xbill-wrapper.c -o $PKG/usr/bin/xbill @@ -87,5 +94,14 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +if [ "$FCAPS" != "false" ]; then + chmod 0751 $PKG/usr/bin/xbill + echo 'setcap "cap_setgid=ep" usr/bin/xbill' >> $PKG/install/doinst.sh +else + # Install setuid-root + chgrp video usr/bin/xbill + chmod 4750 $PKG/usr/bin/xbill +fi + cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |