aboutsummaryrefslogtreecommitdiff
path: root/games/ztrack/ztrack.SlackBuild
diff options
context:
space:
mode:
authorDan-Simon Myrland <dansimon@radiotube.org>2017-03-24 17:19:06 +0000
committerDavid Spencer <idlemoor@slackbuilds.org>2017-03-25 00:07:32 +0000
commit7588ac1bcec05944e2c93b54ab2cec7c2ea79b39 (patch)
tree16e648ca3a42fa3ac9d62187a60880e1e6be5f84 /games/ztrack/ztrack.SlackBuild
parente21154dd841b345c37994c9ef01b98e6e4ec261f (diff)
games/ztrack: Added (ncurses racing game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/ztrack/ztrack.SlackBuild')
-rw-r--r--games/ztrack/ztrack.SlackBuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/games/ztrack/ztrack.SlackBuild b/games/ztrack/ztrack.SlackBuild
new file mode 100644
index 000000000000..fddf5c536ce7
--- /dev/null
+++ b/games/ztrack/ztrack.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Slackware build script for ztrack
+# Written by Dan-Simon Myrland <dansimon@radiotube.org>
+
+PRGNAM=ztrack
+VERSION=${VERSION:-1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+make CFLAGS="$SLKCFLAGS"
+
+mkdir -p $PKG/usr/games
+cp -a $PRGNAM $PKG/usr/games
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/man/man6
+cp -a $PRGNAM.6 $PKG/usr/man/man6
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+
+cp -a ChangeLog README $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/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}