diff options
author | Brad Hermanson <apeitheo@gmail.com> | 2012-02-18 14:17:20 -0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2012-02-18 14:17:20 -0200 |
commit | 677e37fab979321623962abbab837521874405d7 (patch) | |
tree | 4b2e085b2feddc555eb212d9919ef0f35014a101 /games/quakeforge/quakeforge.SlackBuild | |
parent | b3bc959bd5b36bbd6b45ea1a31c07d842be3b151 (diff) | |
download | slackbuilds-677e37fab979321623962abbab837521874405d7.tar.gz |
games/quakeforge: Added (Linux port of id Software's Quake I)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'games/quakeforge/quakeforge.SlackBuild')
-rw-r--r-- | games/quakeforge/quakeforge.SlackBuild | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/games/quakeforge/quakeforge.SlackBuild b/games/quakeforge/quakeforge.SlackBuild new file mode 100644 index 0000000000..e6e93bce50 --- /dev/null +++ b/games/quakeforge/quakeforge.SlackBuild @@ -0,0 +1,75 @@ +#!/bin/sh + +# Brad Hermanson <apeitheo@gmail.com> + +PRGNAM=quakeforge +VERSION=0.6.1 +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.bz2 +cd $PRGNAM-$VERSION + +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CPPFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --libdir=/usr/lib${LIBDIRSUFFIX} + +make +make install DESTDIR=$PKG + +find $PKG | xargs 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/doc/$PRGNAM-$VERSION +cp -a \ + COPYING ChangeLog INSTALL NEWS TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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/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} |