diff options
author | David Melik <dchmelik@gmail.com> | 2012-08-10 17:24:05 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-08-10 18:29:17 -0500 |
commit | cb3928b6eda11c9eea0f2fc9e7e08234e3f5beb1 (patch) | |
tree | a64e8a95c80b136345b6ebaed1983444da742a65 | |
parent | 028ae838cf6dbc8bcba27fe77014a4efbcda9208 (diff) | |
download | slackbuilds-cb3928b6eda11c9eea0f2fc9e7e08234e3f5beb1.tar.gz |
games/moria: Added (a roguelike game)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r-- | games/moria/README | 13 | ||||
-rw-r--r-- | games/moria/doinst.sh | 17 | ||||
-rw-r--r-- | games/moria/fix-config_h.diff | 53 | ||||
-rw-r--r-- | games/moria/moria.SlackBuild | 94 | ||||
-rw-r--r-- | games/moria/moria.info | 10 | ||||
-rw-r--r-- | games/moria/slack-desc | 19 |
6 files changed, 206 insertions, 0 deletions
diff --git a/games/moria/README b/games/moria/README new file mode 100644 index 0000000000..e538f73b14 --- /dev/null +++ b/games/moria/README @@ -0,0 +1,13 @@ +Moria/UMoria is a single player roguelike game with a regenerating +dungeon. moria is the predecessor of angband with a full-screen, +text-based, turn-based interface. It features scrolling maps, and +an infinite (constantly regenerated) dungeon. + +Moria's dungeons are populated by monsters, some of which are +inspired by J.R.R. Tolkien's books. The goal of the game is to +find and kill the Balrog, whereupon the player is crowned King. +Your player can be created from a combination of 8 races (human, +half-elf, elf, halfling, gnome, dwarf, half-orc, half-troll) and +6 classes (warrior, mage, priest, rogue, ranger, paladin), and is +measured by 6 attributes (strength, dexterity, intelligence, +wisdom, constitution, and charisma). diff --git a/games/moria/doinst.sh b/games/moria/doinst.sh new file mode 100644 index 0000000000..9bddea8390 --- /dev/null +++ b/games/moria/doinst.sh @@ -0,0 +1,17 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config var/games/moria/scores.new +config etc/moria-hours.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + diff --git a/games/moria/fix-config_h.diff b/games/moria/fix-config_h.diff new file mode 100644 index 0000000000..3f827cbef2 --- /dev/null +++ b/games/moria/fix-config_h.diff @@ -0,0 +1,53 @@ +diff -Nur moria-5.6.orig/source/config.h moria-5.6/source/config.h +--- moria-5.6.orig/source/config.h 2008-10-13 18:44:36.000000000 -0500 ++++ moria-5.6/source/config.h 2012-08-10 17:20:22.987707262 -0500 +@@ -221,41 +221,23 @@ + + #else + +-#if 0 +-/* Debian standards for file location */ + /* This must be unix; change file names as appropriate. */ + #define MORIA_SAV ".moria-save" + #define MORIA_HOU "/etc/moria-hours" +-#define MORIA_MOR "/usr/lib/games/moria/news" +-#define MORIA_GPL "/usr/lib/games/moria/COPYING" ++#define MORIA_MOR "/usr/share/games/moria/news" ++#define MORIA_GPL "/usr/share/games/moria/COPYING" + #define MORIA_TOP "/var/games/moria/scores" +-#define MORIA_HELP "/usr/lib/games/moria/roglcmds.hlp" +-#define MORIA_ORIG_HELP "/usr/lib/games/moria/origcmds.hlp" +-#define MORIA_WIZ_HELP "/usr/lib/games/moria/rwizcmds.hlp" +-#define MORIA_OWIZ_HELP "/usr/lib/games/moria/owizcmds.hlp" +-#define MORIA_WELCOME "/usr/lib/games/moria/welcome.hlp" +-#define MORIA_VER "/usr/lib/games/moria/version.hlp" ++#define MORIA_HELP "/usr/share/games/moria/roglcmds.hlp" ++#define MORIA_ORIG_HELP "/usr/share/games/moria/origcmds.hlp" ++#define MORIA_WIZ_HELP "/usr/share/games/moria/rwizcmds.hlp" ++#define MORIA_OWIZ_HELP "/usr/share/games/moria/owizcmds.hlp" ++#define MORIA_WELCOME "/usr/share/games/moria/welcome.hlp" ++#define MORIA_VER "/usr/share/games/moria/version.hlp" + +-#else +- +-/* Generic UNIX */ +-/* This must be unix; change file names as appropriate. */ +-#define MORIA_SAV "moria-save" +-#define MORIA_HOU "/home/dgrabiner/moria-5.6/files/hours" +-#define MORIA_MOR "/home/dgrabiner/moria-5.6/files/news" +-#define MORIA_GPL "/home/dgrabiner/moria-5.6/files/COPYING" +-#define MORIA_TOP "/home/dgrabiner/moria-5.6/files/scores" +-#define MORIA_HELP "/home/dgrabiner/moria-5.6/files/roglcmds.hlp" +-#define MORIA_ORIG_HELP "/home/dgrabiner/moria-5.6/files/origcmds.hlp" +-#define MORIA_WIZ_HELP "/home/dgrabiner/moria-5.6/files/rwizcmds.hlp" +-#define MORIA_OWIZ_HELP "/home/dgrabiner/moria-5.6/files/owizcmds.hlp" +-#define MORIA_WELCOME "/home/dgrabiner/moria-5.6/files/welcome.hlp" +-#define MORIA_VER "/home/dgrabiner/moria-5.6/files/version.hlp" + + #endif + #endif + #endif +-#endif + #endif + #endif + #endif diff --git a/games/moria/moria.SlackBuild b/games/moria/moria.SlackBuild new file mode 100644 index 0000000000..92cbbfac43 --- /dev/null +++ b/games/moria/moria.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware build script for Moria + +# Written by David Melik <dchmelik @ gmail dot com> + +PRGNAM=moria +VERSION=${VERSION:-5.6} +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.gz +cd $PRGNAM-$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 {} \; + +patch -p1 < $CWD/fix-config_h.diff + +sed -i "s,/usr/lib/games/,/usr/share/games/,g" unix/Makefile +mv unix/Makefile unix/unix.c files source + +mkdir -p $PKG/etc $PKG/usr/games $PKG/usr/share/games/moria + +make -C source CFLAGS="$SLKCFLAGS" +make -C source install DESTDIR=$PKG + +mv $PKG/etc/moria-hours $PKG/etc/moria-hours.new + +mkdir -p $PKG/var/games/moria +cp -a source/files/scores $PKG/var/games/moria/scores.new +chown -R root:games $PKG/var/games/moria/ +chmod 0775 $PKG/var/games/moria/ +chmod 0664 $PKG/var/games/moria/scores.new + +mkdir -p $PKG/usr/man/man6 +cp -a doc/moria.6 $PKG/usr/man/man6 +gzip -9 $PKG/usr/man/man6/moria.6 + +# Fixup a few other ownership/permission issues +chown -R root:root $PKG/usr/share/games/moria/ +chmod 0644 $PKG/usr/share/games/moria/* + +find $PKG -print0 | xargs -0 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 \ + doc source/files/{COPYING,news} README ERRORS INSTALL ChangeLog* \ + $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} diff --git a/games/moria/moria.info b/games/moria/moria.info new file mode 100644 index 0000000000..a6466474f8 --- /dev/null +++ b/games/moria/moria.info @@ -0,0 +1,10 @@ +PRGNAM="moria" +VERSION="5.6" +HOMEPAGE="http://www.remarque.org/~grabiner/moria.html" +DOWNLOAD="http://www.asselstine.com/moria-5.6.tar.gz" +MD5SUM="09fd637948e3486730c88e8e15eb42fa" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="David Melik" +EMAIL="dchmelik@gmail.com" +APPROVED="rworkman" diff --git a/games/moria/slack-desc b/games/moria/slack-desc new file mode 100644 index 0000000000..abc6c3e35d --- /dev/null +++ b/games/moria/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +moria: moria (a roguelike game) +moria: +moria: A single player roguelike game with a regenerating dungeon, moria is +moria: the predecessor of angband with a fullscreen, text-based, turn-based +moria: interface. It features scrolling maps, and an infinite (constantly +moria: regenerated) dungeon. +moria: +moria: +moria: +moria: +moria: |