mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
games/nethack: Updated for version 3.6.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
c378795698
commit
dae7183f82
3 changed files with 43 additions and 36 deletions
|
@ -4,3 +4,5 @@ different landscape - the random number generator provides an
|
|||
essentially unlimited number of variations of the dungeon and its
|
||||
denizens to be discovered by the player in one of a number of
|
||||
characters: you can pick your race, your role, and your gender.
|
||||
|
||||
User accounts that play this need to be members of the "games" group.
|
||||
|
|
|
@ -2,14 +2,15 @@
|
|||
|
||||
# Slackware build script for nethack.
|
||||
|
||||
# Written by Dugan Chen (thedoogster@gmail.com)
|
||||
# Written by Dugan Chen (thedoogster [at] gmail [dot] com)
|
||||
# Based on the Arch Linux PkgBuild.
|
||||
|
||||
PRGNAM=nethack
|
||||
VERSION=${VERSION:-3.4.3}
|
||||
VERSION=${VERSION:-3.6.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
SRCVER=${SRCVER:-343}
|
||||
SRCVER=${SRCVER:-360}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -53,44 +54,48 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
sh sys/unix/setup.sh
|
||||
|
||||
sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/var/games/nethack/|' \
|
||||
-e '/^#define COMPRESS\s/ s|/usr/bin/compress|/bin/gzip|' \
|
||||
-e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
|
||||
-e 's|^/\* \(#define DLB\) \*/|\1|' -i include/config.h
|
||||
|
||||
sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
|
||||
-e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i include/unixconf.h
|
||||
|
||||
sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
|
||||
-e 's|^WINTTYLIB = -ltermlib|#&|' -i src/Makefile
|
||||
-e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i include/unixconf.h
|
||||
|
||||
# we are setting up for setgid games, so modify all necessary permissions
|
||||
# to allow full access for groups
|
||||
sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/var/games/$(GAME)|' \
|
||||
-e '/^GAMEUID\s*=/ s|games|root|' \
|
||||
-e '/^GAMEGRP\s*=/ s|bin|games|' \
|
||||
-e '/^GAMEPERM\s*=/ s|04755|02755|' \
|
||||
-e '/^FILEPERM\s*=/ s|0644|0664|' \
|
||||
-e '/^DIRPERM\s*=/ s|0755|0775|' \
|
||||
-e '/^SHELLDIR\s*=/ s|/games|/usr/bin|' -i Makefile
|
||||
|
||||
sed -e "/^MANDIR\s*=/s|/usr/man/man6|$PKG/usr/man/man6|" -i doc/Makefile
|
||||
sed -e '/^HACKDIR/ s|/games/lib/\$(GAME)dir|/var/games/nethack/|' \
|
||||
-e '/^SHELLDIR/ s|/games|/usr/bin|' \
|
||||
-e '/^VARDIRPERM/ s|0755|0775|' \
|
||||
-e '/^VARFILEPERM/ s|0600|0664|' \
|
||||
-e '/^GAMEPERM/ s|0755|02755|' \
|
||||
-e 's|\(DSYSCF_FILE=\)\\"[^"]*\\"|\1\\"/var/games/nethack/sysconf\\"|' \
|
||||
-e 's|\(DHACKDIR=\)\\"[^"]*\\"|\1\\"/var/games/nethack/\\"|' -i sys/unix/hints/linux
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
make
|
||||
sed -e 's|^#GAMEUID.*|GAMEUID = root|' \
|
||||
-e 's|^#GAMEGRP.*|GAMEGRP = games|' \
|
||||
-e '/^FILEPERM\s*=/ s|0644|0664|' \
|
||||
-e '/^DIRPERM\s*=/ s|0755|0775|' -i sys/unix/Makefile.top
|
||||
|
||||
sed -e "/^MANDIR\s*=/s|/usr/man/man6|$PKG/usr/man/man6|" -i sys/unix/Makefile.doc
|
||||
|
||||
cd sys/unix
|
||||
sh setup.sh hints/linux
|
||||
cd ../..
|
||||
make install PREFIX=$PKG
|
||||
mkdir -p $PKG/usr/man/man6
|
||||
make PREFIX=$PKG -j1 install manpages # Multi-threaded builds fail.
|
||||
|
||||
install -dm755 $PKG/usr/man/man6
|
||||
install -dm775 $PKG/var/games/
|
||||
make PREFIX=$PKG install manpages
|
||||
sed -e "s|HACKDIR=$PKG/|HACKDIR=/|" \
|
||||
-e 's|HACK=$HACKDIR|HACK=/usr/lib/nethack|' \
|
||||
-i $PKG/usr/bin/nethack
|
||||
-e "s|HACK=\$HACKDIR|HACK=/usr/lib$LIBDIRSUFFIX/nethack|" \
|
||||
-i $PKG/usr/bin/nethack
|
||||
|
||||
install -dm755 $PKG/usr/lib/nethack
|
||||
mv $PKG/var/games/nethack/{nethack,recover} $PKG/usr/lib/nethack/
|
||||
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/nethack
|
||||
mv $PKG/var/games/nethack/{nethack,recover} $PKG/usr/lib$LIBDIRSUFFIX/nethack/
|
||||
|
||||
# FS#43414: /var/games should be owned by root:games.
|
||||
chown -R root:games $PKG/var/games/
|
||||
chown root:games $PKG/usr/lib$LIBDIRSUFFIX/nethack/nethack
|
||||
|
||||
# FS#43414: /var/games should be owned by root:games.
|
||||
mkdir -p $PKG/var/games
|
||||
chown -R root:games $PKG/var/games/
|
||||
|
||||
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
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="nethack"
|
||||
VERSION="3.4.3"
|
||||
VERSION="3.6.0"
|
||||
HOMEPAGE="http://nethack.org"
|
||||
DOWNLOAD="http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/nethack-343-src.tgz"
|
||||
MD5SUM="21479c95990eefe7650df582426457f9"
|
||||
DOWNLOAD="http://downloads.sourceforge.net/project/nethack/nethack/3.6.0/nethack-360-src.tgz"
|
||||
MD5SUM="d42147b26e5fb4746fb72536ce145984"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="Dugan Chen"
|
||||
EMAIL="thedoogster@gmail.com"
|
||||
EMAIL="thedoogster [at] gmail [dot] com"
|
||||
|
|
Loading…
Reference in a new issue