diff options
Diffstat (limited to 'games/blobAndConquer/blobAndConquer.SlackBuild')
-rw-r--r-- | games/blobAndConquer/blobAndConquer.SlackBuild | 68 |
1 files changed, 30 insertions, 38 deletions
diff --git a/games/blobAndConquer/blobAndConquer.SlackBuild b/games/blobAndConquer/blobAndConquer.SlackBuild index 651802673c..6ce86933b6 100644 --- a/games/blobAndConquer/blobAndConquer.SlackBuild +++ b/games/blobAndConquer/blobAndConquer.SlackBuild @@ -1,64 +1,56 @@ #!/bin/sh -## Written by hollywoodb (hollywoodb@fastmail.fm) +# Slackware build script for blobAndConquer -## Feel free to use, modify, redistribute this script. -## If you make changes please modify the "Written by" -## so that I don't recieve emails about a script I -## did not write. Thanks. +# Written by Wade Nelson <hollywoodb@fastmail.fm> -# Modified by the SlackBuilds.org project +set -e -if [ "$(id -u)" != "0" ]; then - echo "This script must be run as root!" - exit -fi - -NAME=blobAndConquer -VERSION=0.7 -SUBVERSION=2 -PKG_VERSION=$VERSION.$SUBVERSION +PRGNAM=blobAndConquer +VERSION=0.91 +SUBVER=1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=`pwd` +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=${PKG:-$TMP/package-$NAME} +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 -rm -rf $NAME-$VERSION -tar -zxvf $CWD/$NAME-$VERSION-$SUBVERSION.tar.gz || exit 1 -cd $NAME-$VERSION || exit 1 - -chown -R root:root . -chmod -R u+w,go+r-w,a-s . - if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" fi -# Let's fix the documentation directory in the makefile -# instead of doing it manually in the script -patch -p1 < $CWD/makefile.diff || exit 1 +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-$VERSION-$SUBVER.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +sed -i '16s|share/doc/$(PROG)|doc/$(PROG)-$(VERSION)|g' makefile +sed -i '17s|share/icons|share/pixmaps|g' makefile -make || exit 1 -make install DESTDIR=$PKG || exit 1 +make +make install DESTDIR=$PKG -sed -i 's#Icon=blobAndConquer#Icon=/usr/share/icons/blobAndConquer.png#' \ - $PKG/usr/share/applications/blobAndConquer.desktop || exit 1 +sed -i 's|0.7|0.91|g' $PKG/usr/share/applications/$PRGNAM.desktop -find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +( 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 +) -cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$PKG_VERSION/$NAME.SlackBuild +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a credits.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$NAME-$PKG_VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |