diff options
author | B. Watson <yalhcru@gmail.com> | 2012-02-19 15:29:32 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-02-20 12:20:46 -0600 |
commit | b3c8ac4b4fc631a0b982b4b478a38d5727aecec2 (patch) | |
tree | 697e792d27b6327b4b2ef06aa282e41f39c49650 /games/alephone/alephone.SlackBuild | |
parent | 57c5231db012420e75f2a682adfc15ae9b048efc (diff) |
games/alephone: Added (open-source Marathon 2 engine)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'games/alephone/alephone.SlackBuild')
-rw-r--r-- | games/alephone/alephone.SlackBuild | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/games/alephone/alephone.SlackBuild b/games/alephone/alephone.SlackBuild new file mode 100644 index 0000000000000..f6bd3a6c075f9 --- /dev/null +++ b/games/alephone/alephone.SlackBuild @@ -0,0 +1,93 @@ +#!/bin/sh + +# Slackware build script for alephone + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=alephone +VERSION=${VERSION:-20111201} +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 + +SRCNAM="AlephOne" + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 +cd $SRCNAM-$VERSION +chown -R root:root . +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" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +gzip -9 $PKG/usr/man/man?/*.? + +# This isn't a standalone app, so don't install a .desktop +# Instead, the game-data packages each get a .desktop. +# However, they all use the same icon, so install it here. + +# Icon taken from the windows alephone.exe +mkdir -p $PKG/usr/share/pixmaps +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +# ChangeLog is 0 bytes in 20111201 release. If updating this script, +# check the new ChangeLog and add it here if not empty. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING README THANKS examples docs/*.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} |