updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nethack-lisp / PKGBUILD
blobf002b2853296d16f49685f49f0b7d35996ffc3af
1 # $Id$
2 # Contributor : Peter Feigl <peter.feigl@gmail.com>
4 pkgname=nethack-lisp
5 pkgver=3.4.3
6 pkgrel=1
7 pkgdesc='A single player dungeon exploration game. Lisp patch for nethack-el.'
8 arch=('i686' 'x86_64')
9 url="http://www.nongnu.org/nethack-el/"
10 license=('custom')
11 depends=('ncurses' 'gzip' 'emacs')
12 conflicts=('nethack')
13 source=(http://downloads.sourceforge.net/sourceforge/nethack/nethack-343-src.tgz http://mirror.lihnidos.org/GNU/savannah/nethack-el/nethack_el-0.9.5.tar.gz)
15 build(){
16   xpkgname=nethack
17   xpkgver=3.4.3
18   cd $startdir/src/$xpkgname-$xpkgver/
19   patch -p 1 < ../nethack_el-0.9.5/enh-343.patch
20   cd $startdir/src/$xpkgname-$xpkgver/sys/unix
21   sh setup.sh
23   cd $startdir/src/$xpkgname-$xpkgver/include
24   sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/nethack/|' \
25       -e '/^#define COMPRESS\s/ s|/usr/bin/compress|/bin/gzip|' \
26       -e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
27       -e 's|^/\* \(#define DLB\) \*/|\1|' -i config.h
28   sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
29       -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
30   cd $startdir/src/$xpkgname-$xpkgver/src
31 #  sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
32 #      -e 's|^WINTTYLIB = -ltermlib|#&|' -i Makefile
33   cd ..
34   sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/share/$(GAME)|' \
35       -e '/^GAMEUID\s*=/ s|games|root|' \
36       -e '/^GAMEGRP\s*=/ s|bin|root|' \
37       -e '/^SHELLDIR\s*=/ s|/games|/bin|' -i Makefile
39   make || return 1
40   make PREFIX=$startdir/pkg/usr install
41   mv $startdir/pkg/usr/bin/nethack $startdir/pkg/usr/bin/nethack-lisp
42   sed -e 's|HACKDIR=.*/pkg/usr/|HACKDIR=/usr/|' \
43       -i $startdir/pkg/usr/bin/nethack
44   install -Dm644 dat/license $startdir/pkg/usr/share/licenses/nethack/license
46 source /etc/makepkg.conf
48 md5sums=('21479c95990eefe7650df582426457f9'
49          'e8e08e1eeb5506871fe7d84e5d0a52b0')