diff options
author | B. Watson <yalhcru@gmail.com> | 2014-04-29 16:42:57 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-04-29 16:42:57 +0700 |
commit | 2675589b9b30758b9f1d9238bb08ab019c2e1952 (patch) | |
tree | bd32b8e063f6ff64e2b02727120a7746d375c7c4 /games/pacman-arena/pacman-arena.SlackBuild | |
parent | a970f38732bed7210d480d9953fb4c9c47ca861e (diff) | |
download | slackbuilds-2675589b9b30758b9f1d9238bb08ab019c2e1952.tar.gz |
games/pacman-arena: Added (3D maze game).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/pacman-arena/pacman-arena.SlackBuild')
-rw-r--r-- | games/pacman-arena/pacman-arena.SlackBuild | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/games/pacman-arena/pacman-arena.SlackBuild b/games/pacman-arena/pacman-arena.SlackBuild new file mode 100644 index 0000000000..6a7f2fc434 --- /dev/null +++ b/games/pacman-arena/pacman-arena.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/sh + +# Slackware build script for pacman-arena + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=pacman-arena +VERSION=${VERSION:-0.15} +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=pacman + +# This will likely never change +DATAFILE=pacman-data-0.0.zip + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $SRCNAM +unzip $CWD/$DATAFILE +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 {} \; + +autoreconf -if + +# I know we're supposed to use LIBS="-lm", but it doesn't work here. +LDFLAGS="-lm" \ +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 + +# fix up path for data files +sed -i -e "s,share/pacman,share/games/$PRGNAM," Makefile + +make + +# make install is too annoying to use, it's less code to install without. +mkdir -p \ + $PKG/usr/games \ + $PKG/usr/share/games/$PRGNAM/sfx \ + $PKG/usr/share/games/$PRGNAM/gfx +install -s -m0755 $SRCNAM $PKG/usr/games/$PRGNAM +install -m0644 sfx/* $PKG/usr/share/games/$PRGNAM/sfx +install -m0644 gfx/* $PKG/usr/share/games/$PRGNAM/gfx + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# icon is a 32x32 chunk of gfx/pacman_arena1.tga edited with gimp. +mkdir -p $PKG/usr/share/pixmaps +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +# .desktop written for this build +mkdir -p $PKG/usr/share/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +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} |