summaryrefslogtreecommitdiff
path: root/games/solarwolf/solarwolf.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-05-19 10:20:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-05-19 11:01:58 +0700
commit6da9ccf9f52d8076195278f71a534b04ae50f965 (patch)
tree7094f7431343114be9583800862868d707452d90 /games/solarwolf/solarwolf.SlackBuild
parent26049c64b420c53cb656771c84d38cf28cb836ca (diff)
downloadslackbuilds-6da9ccf9f52d8076195278f71a534b04ae50f965.tar.gz
games/solarwolf: Added (2d arcade game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/solarwolf/solarwolf.SlackBuild')
-rw-r--r--games/solarwolf/solarwolf.SlackBuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/games/solarwolf/solarwolf.SlackBuild b/games/solarwolf/solarwolf.SlackBuild
new file mode 100644
index 0000000000..6c3429337b
--- /dev/null
+++ b/games/solarwolf/solarwolf.SlackBuild
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Slackware build script for solarwolf
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=solarwolf
+VERSION=${VERSION:-1.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+# upstream permissions are especially bletcherous
+find . -type d -print0 | xargs -0 chmod 0755
+find . -type f -print0 | xargs -0 chmod 0644
+find . -name .xvpics -print0 | xargs -0 rm -rf
+
+mkdir -p \
+ $PKG/usr/games \
+ $PKG/usr/share/games/$PRGNAM \
+ $PKG/usr/share/pixmaps \
+ $PKG/usr/share/applications \
+ $PKG/usr/man/man6
+
+# the code is all python, keep in /usr/share along with the game data.
+sed -i "s,usr/lib/games/$PRGNAM,usr/share/games/$PRGNAM/code," $PRGNAM.py
+
+cp -a code data $PKG/usr/share/games/$PRGNAM
+install -oroot -groot -m0755 $PRGNAM.py $PKG/usr/games/$PRGNAM
+
+# original .desktop file don't validate, use our own
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+cat dist/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+cat dist/$PRGNAM.6.gz > $PKG/usr/man/man6/$PRGNAM.6.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}