blob: a7d4f467c9a65b7d78abbe2cd7a1be0920891b85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Contributor: Jesse Young <jlyo@jlyo.org>
# Maintainer:
pkgname=nethack
pkgver=3.4.3
pkgrel=0
pkgdesc='A single player dungeon exploration game'
arch='all'
url='http://www.nethack.org/index.html'
license='custom'
depends='ncurses gzip'
makedepends='ncurses-dev byacc flex linux-headers'
subpackages="$pkgname-doc"
install=""
source="http://downloads.sourceforge.net/$pkgname/$pkgname-${pkgver//.}-src.tgz
nethack.bin"
build(){
cd $srcdir/$pkgname-$pkgver/
sh sys/unix/setup.sh
sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/lib/nethack/|' \
-e "/^#define COMPRESS\s/ s|/usr/bin/compress|$(which 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
sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/usr/lib/$(GAME)|' \
-e '/^GAMEPERM\s*=/ s|04755|0755|' \
-e '/^GAMEUID\s*=/ s|games|root|' \
-e '/^GAMEGRP\s*=/ s|bin|root|' \
-e '/^CHOWN\s*=/ s|chown|true|' \
-e '/^CHGRP\s*=/ s|chgrp|true|' \
-e '/^SHELLDIR\s*=/ s|/games|/usr/bin|' -i Makefile
sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i doc/Makefile
sed -e "s/^LEX\s*=.*$/LEX=flex/" -i util/Makefile
make
}
package() {
cd $srcdir/$pkgname-$pkgver/
install -dm755 $pkgdir/usr/share/man/man6
install -dm755 $pkgdir/usr/share/doc/nethack
install -dm755 $pkgdir/usr/share/nethack
make PREFIX=$pkgdir install manpages
rm -f $pkgdir/usr/bin/nethack
rm -f $pkgdir/usr/lib/nethack/license
rm -f $pkgdir/usr/lib/nethack/logfile
rm -f $pkgdir/usr/lib/nethack/perm
rm -f $pkgdir/usr/lib/nethack/record
rm -rf $pkgdir/usr/lib/nethack/save
mv $pkgdir/usr/lib/nethack/nhdat $pkgdir/usr/share/nethack/nhdat
install -m755 $srcdir/nethack.bin $pkgdir/usr/bin/nethack
install -Dm644 doc/Guidebook.txt $pkgdir/usr/share/doc/nethack/Guidebook.txt
install -Dm644 dat/license $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
md5sums="21479c95990eefe7650df582426457f9 nethack-343-src.tgz
2498972119efd501fbe9d3a0cacfa107 nethack.bin"
sha256sums="bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4 nethack-343-src.tgz
e9efd10d5a57bfcfefda6720308fdff9c14a2e71b0b4c68f2267dc59e7b7e3cf nethack.bin"
sha512sums="052342c19619219f291571d48cf7799f962eb6ec6f8a276427225c0abbd833eada18abeff9fbd647919f2a9e3bb097d7f154675e283fe48abc4752f24c192d8f nethack-343-src.tgz
0846b0a22451e420366c790b128e8c6b9ba902595e963f51bbbb61c7b7bebdeee2a13e51fc7f786e2da95834372ec6a5792d7a0308250c98b6bd48026d881eb0 nethack.bin"
|