diff options
Diffstat (limited to 'games/foobillard/foobillard.SlackBuild')
-rw-r--r-- | games/foobillard/foobillard.SlackBuild | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/games/foobillard/foobillard.SlackBuild b/games/foobillard/foobillard.SlackBuild index f2ed37fa24..10f65c4023 100644 --- a/games/foobillard/foobillard.SlackBuild +++ b/games/foobillard/foobillard.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for FooBillard -# Copyright 2007 Frank Caraballo <fecaraballo[AT]gmail.com> +# Copyright 2007, 2008 Frank Caraballo <fecaraballo{at}gmail{dot}com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,31 +23,38 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=foobillard -VERSION=3.0a +VERSION=${VERSION:-3.0a} ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -PDOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README README.FONTS TODO" - 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 + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION.tar.* || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R u+w,go+r-w,a-s . +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 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -55,33 +62,27 @@ CXXFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - || exit 1 + --build=$ARCH-slackware-linux -make || exit 1 -make install-strip DESTDIR=$PKG || exit 1 +make +make install-strip DESTDIR=$PKG # Add missed man page: -mkdir -p $PKG/usr/man/man6 -cp -a $PRGNAM.6 $PKG/usr/man/man6 - -( 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 -) +install -D -m 0644 foobillard.6 $PKG/usr/man/man6/foobillard.6 +gzip -9 $PKG/usr/man/man6/foobillard.6 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $PDOCS $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README* TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mkdir -p $PKG/install -cat $CWD/doinst.sh > $PKG/install/doinst.sh -cat $CWD/slack-desc > $PKG/install/slack-desc - -mkdir -p $PKG/usr/share/pixmaps +mkdir -p $PKG/usr/share/{applications,pixmaps} +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop cat $CWD/$PRGNAM.xpm > $PKG/usr/share/pixmaps/$PRGNAM.xpm -mkdir -p $PKG/usr/share/applications -cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +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 |