diff options
author | Marshall Scott <bacchist@gmail.com> | 2010-05-12 23:29:07 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:29:07 +0200 |
commit | 2c051649490cb12da98fce62ff5e2aca7d0ac6c0 (patch) | |
tree | 0a3742c5516cd17d50a864748309777a280e7e01 | |
parent | 76d073ed29c22e570ea421b2d49ccc034909c9da (diff) |
games/angband: Added to 12.2 repository
-rw-r--r-- | games/angband/Fix_DESTDIR_support.patch | 93 | ||||
-rw-r--r-- | games/angband/README | 6 | ||||
-rw-r--r-- | games/angband/angband.SlackBuild | 91 | ||||
-rw-r--r-- | games/angband/angband.info | 8 | ||||
-rw-r--r-- | games/angband/doinst.sh | 23 | ||||
-rw-r--r-- | games/angband/slack-desc | 19 |
6 files changed, 240 insertions, 0 deletions
diff --git a/games/angband/Fix_DESTDIR_support.patch b/games/angband/Fix_DESTDIR_support.patch new file mode 100644 index 0000000000000..51cc9433f7f6b --- /dev/null +++ b/games/angband/Fix_DESTDIR_support.patch @@ -0,0 +1,93 @@ +Trivial patch by Robby Workman <rworkman@slackware.com> +This simply fixes the install-posthook files to respect DESTDIR settings +instead of trying to write to the real / filesystem. This will only be +noticed if you enable setgid functionality... + +diff -Nur angband-3.1.0beta.orig/lib/apex/Makefile angband-3.1.0beta/lib/apex/Makefile +--- angband-3.1.0beta.orig/lib/apex/Makefile 2008-05-17 08:08:23.000000000 -0500 ++++ angband-3.1.0beta/lib/apex/Makefile 2009-03-23 00:05:28.102772735 -0500 +@@ -6,10 +6,10 @@ + + install-posthook: + if [ "x$(SETEGID)" != "x" ]; then \ +- printf "%10s %-20s\n" TOUCH ${DATA_PATH}/apex/scores.raw; \ ++ printf "%10s %-20s\n" TOUCH $(DESTDIR)${DATA_PATH}/apex/scores.raw; \ + if [ "x$(DRY)" = "x" ]; then \ +- touch ${DATA_PATH}/apex/scores.raw; \ +- chown -R root:${SETEGID} ${DATA_PATH}/apex; \ +- chmod -R g+w ${DATA_PATH}/apex; \ ++ touch $(DESTDIR)${DATA_PATH}/apex/scores.raw; \ ++ chown -R root:${SETEGID} $(DESTDIR)${DATA_PATH}/apex; \ ++ chmod -R g+w $(DESTDIR)${DATA_PATH}/apex; \ + fi; \ + fi; +diff -Nur angband-3.1.0beta.orig/lib/bone/Makefile angband-3.1.0beta/lib/bone/Makefile +--- angband-3.1.0beta.orig/lib/bone/Makefile 2008-05-17 08:08:23.000000000 -0500 ++++ angband-3.1.0beta/lib/bone/Makefile 2009-03-23 00:05:36.083328120 -0500 +@@ -7,7 +7,7 @@ + install-posthook: + if [ "x$(SETEGID)" != "x" ]; then \ + if [ "x$(DRY)" = "x" ]; then \ +- chown root:${SETEGID} ${DATA_PATH}/bone; \ +- chmod 070 ${DATA_PATH}/bone; \ ++ chown root:${SETEGID} $(DESTDIR)${DATA_PATH}/bone; \ ++ chmod 070 $(DESTDIR)${DATA_PATH}/bone; \ + fi; \ + fi +diff -Nur angband-3.1.0beta.orig/lib/data/Makefile angband-3.1.0beta/lib/data/Makefile +--- angband-3.1.0beta.orig/lib/data/Makefile 2008-06-02 12:36:12.000000000 -0500 ++++ angband-3.1.0beta/lib/data/Makefile 2009-03-23 00:05:43.223826793 -0500 +@@ -9,23 +9,23 @@ + + install-posthook: + if [ "x$(SETEGID)" != "x" ]; then \ +- printf "%10s %s*.raw\n" TOUCH ${DATA_PATH}/data/; \ ++ printf "%10s %s*.raw\n" TOUCH $(DESTDIR)${DATA_PATH}/data/; \ + if [ "x$(DRY)" = "x" ]; then \ +- touch ${DATA_PATH}/data/artifact.raw; \ +- touch ${DATA_PATH}/data/ego_item.raw; \ +- touch ${DATA_PATH}/data/flavor.raw; \ +- touch ${DATA_PATH}/data/limits.raw; \ +- touch ${DATA_PATH}/data/monster.raw; \ +- touch ${DATA_PATH}/data/object.raw; \ +- touch ${DATA_PATH}/data/p_class.raw; \ +- touch ${DATA_PATH}/data/p_hist.raw; \ +- touch ${DATA_PATH}/data/p_race.raw; \ +- touch ${DATA_PATH}/data/prices.raw; \ +- touch ${DATA_PATH}/data/shop_own.raw; \ +- touch ${DATA_PATH}/data/spells.raw; \ +- touch ${DATA_PATH}/data/terrain.raw; \ +- touch ${DATA_PATH}/data/vault.raw; \ +- chown -R root:${SETEGID} ${DATA_PATH}/data; \ +- chmod -R g+w ${DATA_PATH}/data; \ ++ touch $(DESTDIR)${DATA_PATH}/data/artifact.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/ego_item.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/flavor.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/limits.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/monster.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/object.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/p_class.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/p_hist.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/p_race.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/prices.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/shop_own.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/spells.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/terrain.raw; \ ++ touch $(DESTDIR)${DATA_PATH}/data/vault.raw; \ ++ chown -R root:${SETEGID} $(DESTDIR)${DATA_PATH}/data; \ ++ chmod -R g+w $(DESTDIR)${DATA_PATH}/data; \ + fi; \ + fi +diff -Nur angband-3.1.0beta.orig/lib/save/Makefile angband-3.1.0beta/lib/save/Makefile +--- angband-3.1.0beta.orig/lib/save/Makefile 2008-05-17 08:08:23.000000000 -0500 ++++ angband-3.1.0beta/lib/save/Makefile 2009-03-23 00:06:04.161286215 -0500 +@@ -7,7 +7,7 @@ + install-posthook: + if [ "x$(SETEGID)" != "x" ]; then \ + if [ "x$(DRY)" = "x" ]; then \ +- chown root:${SETEGID} ${DATA_PATH}/save; \ +- chmod 070 ${DATA_PATH}/save; \ ++ chown root:${SETEGID} $(DESTDIR)${DATA_PATH}/save; \ ++ chmod 070 $(DESTDIR)${DATA_PATH}/save; \ + fi; \ + fi diff --git a/games/angband/README b/games/angband/README new file mode 100644 index 0000000000000..50e79cb6ae85e --- /dev/null +++ b/games/angband/README @@ -0,0 +1,6 @@ +Angband is a graphical dungeon adventure game that uses textual characters +to represent the walls and floors of a dungeon and the inhabitants therein, +in the vein of games like NetHack and Rogue. + +Your user account will need to be a member of the "games" group in order +to play Angband with best results. diff --git a/games/angband/angband.SlackBuild b/games/angband/angband.SlackBuild new file mode 100644 index 0000000000000..57ffd240d7ce9 --- /dev/null +++ b/games/angband/angband.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for angband + +# Written by Marshall Scott (bacchist@gmail.com) + +PRGNAM=angband +VERSION=3.1.0beta +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +rm -rf $TMP/$PRGNAM-$VERSION +cd $TMP || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Fixup the DESTDIR support for --with-setgid +patch -p1 < $CWD/Fix_DESTDIR_support.patch || exit 1 + +# --enable-gtk and setgid are incompatible, so we'll not build the gtk part +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --with-libpath=/usr/share/games/angband \ + --bindir=/usr/games \ + --with-setgid=games \ + --build=$ARCH-slackware-linux \ + || exit 1 + +make || exit +make install DESTDIR=$PKG || exit + +# We'll deviate from what upstream does a little bit... +mkdir -p $PKG/var/games/angband +mv $PKG/usr/share/games/angband/{apex,bone,data,save} $PKG/var/games/angband +( cd $PKG/usr/share/games/angband + for i in apex bone data save ; do + ln -s ../../../../var/games/angband/$i . + done +) + +# We'll kill the "delete.me" files in the package; probably these are left so +# that lesser package management tools don't choke on empty directories +find $PKG -name "delete.me" -exec rm -f {} \; || true + +# Now let's prevent upgrades from clobbering any existing datafiles +# We'll handle these in doinst.sh +mv $PKG/var/games/angband/apex/scores.raw \ + $PKG/var/games/angband/apex/scores.raw.new +for i in \ + artifact ego_item flavor limits monster object p_class \ + p_hist p_race prices shop_own spells terrain vault ; + do mv $PKG/var/games/angband/data/$i.raw \ + $PKG/var/games/angband/data/$i.raw.new ; +done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + changes.txt copying.txt faq.txt readme.txt thanks.txt lib/help/ \ + $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$APP.SlackBuild +rm -f $PKG/usr/doc/$PRGNAM-$VERSION/help/.depend* + +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.tgz + diff --git a/games/angband/angband.info b/games/angband/angband.info new file mode 100644 index 0000000000000..da2517c81220e --- /dev/null +++ b/games/angband/angband.info @@ -0,0 +1,8 @@ +PRGNAM="angband" +VERSION="3.1.0beta" +HOMEPAGE="http://www.rephial.org/" +DOWNLOAD="http://angband.oook.cz/download/angband-3.1.0beta.tar.gz" +MD5SUM="65215f909583673e196579fe6d0be105" +MAINTAINER="Marshall Scott" +EMAIL="bacchist@gmail.com" +APPROVED="rworkman" diff --git a/games/angband/doinst.sh b/games/angband/doinst.sh new file mode 100644 index 0000000000000..fa833fa0f0d9a --- /dev/null +++ b/games/angband/doinst.sh @@ -0,0 +1,23 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + [ ! -r $OLD ] && mv $NEW $OLD + rm -f $NEW +} + +config var/games/angband/apex/scores.raw.new +config var/games/angband/data/artifact.raw.new +config var/games/angband/data/ego_item.raw.new +config var/games/angband/data/flavor.raw.new +config var/games/angband/data/limits.raw.new +config var/games/angband/data/monster.raw.new +config var/games/angband/data/object.raw.new +config var/games/angband/data/p_class.raw.new +config var/games/angband/data/p_hist.raw.new +config var/games/angband/data/p_race.raw.new +config var/games/angband/data/prices.raw.new +config var/games/angband/data/shop_own.raw.new +config var/games/angband/data/spells.raw.new +config var/games/angband/data/terrain.raw.new +config var/games/angband/data/vault.raw.new + diff --git a/games/angband/slack-desc b/games/angband/slack-desc new file mode 100644 index 0000000000000..ef83433997991 --- /dev/null +++ b/games/angband/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +angband: angband (graphical dungeon adventure game) +angband: +angband: Angband is a graphical dungeon adventure game that uses textual +angband: characters to represent the walls and floors of a dungeon and the +angband: inhabitants therein, in the vein of games like NetHack and Rogue. +angband: For more information about the game, its variants, and somewhere to +angband: upload your characters and screenshots, please see +angband: http://angband.oook.cz/. +angband: +angband: Home: http://rephial.org/ Forum: http://angband.oook.cz/forum/ +angband: |