diff options
author | B. Watson <yalhcru@gmail.com> | 2016-08-10 20:01:09 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-08-13 07:22:19 +0700 |
commit | 81065fa127fbc46f8457b9c2f6b68011877380b6 (patch) | |
tree | 872f47062841274a98d9f522e48e009ba3ba92aa /games/ostrichriders/ostrichriders.SlackBuild | |
parent | 020be42b8c4985c4ddac3efa9a7c3728a955915c (diff) | |
download | slackbuilds-81065fa127fbc46f8457b9c2f6b68011877380b6.tar.gz |
games/ostrichriders: Added (clone of the arcade game "Joust").
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/ostrichriders/ostrichriders.SlackBuild')
-rw-r--r-- | games/ostrichriders/ostrichriders.SlackBuild | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/games/ostrichriders/ostrichriders.SlackBuild b/games/ostrichriders/ostrichriders.SlackBuild new file mode 100644 index 0000000000..270a2bf5fb --- /dev/null +++ b/games/ostrichriders/ostrichriders.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware build script for ostrichriders + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=ostrichriders +VERSION=${VERSION:-0.6.3} +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" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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.tgz +cd $PRGNAM-$VERSION +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 {} \; + +# This stuff looks like it was included in the tarball by mistake. +rm -f data/mods/sandbox/media/Thumbs.db \ + data/mods/*/"scores (copie).dat" + +# SBo's SFML doesn't ship a .pc file for pkg-config, so do it the hard +# way. Also, BINDIR and prefix are used in a nonstandard way. -Wl,-s +# strips the binary. + +make prefix=$PKG \ + BINDIR=$PKG/usr/games \ + ADD_CFLAGS="$SLKCFLAGS" \ + ADD_LDFLAGS="-Wl,-s \ + -L/usr/lib$LIBDIRSUFFIX \ + -lsfml-audio \ + -lsfml-graphics \ + -lsfml-system \ + -lsfml-window \ + $( pkg-config --libs fontconfig )" \ + all \ + install + +# Binary is named in MixedCase, symlink to lowercase for convenience. +ln -s OstrichRiders $PKG/usr/games/$PRGNAM + +# man page written for this build (if nothing else, I need the practice). +mkdir -p $PKG/usr/man/man6 +gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz +ln -s $PRGNAM.6.gz $PKG/usr/man/man6/OstrichRiders.6.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENCE README html/* $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} |