1 # Contributor: Dragonlord <dragonlord[at]seznam[.]cz>
5 pkgdesc="Roguelike computer role playing game based on Angband"
7 url="http://www.zangband.org"
8 depends=('ncurses' 'lesstif')
9 makedepends=('ncurses')
11 source=(http://downloads.sourceforge.net/zangband/$pkgname-$pkgver.tar.gz \
13 install=(zangband.install)
15 md5sums=('8ea43c1b13c54157558bfd0ad3cee295'
16 '74183fd3880704df6ab64e4c2887b852')
19 cd $startdir/src/$pkgname/src/
21 cp "makefile.std" "makefile"
22 cp "z-config.h" "z-config.h.bak"
23 sed -e 's@# define DEFAULT_PATH "./lib/"@# define DEFAULT_PATH "/usr/lib/zangband/"@' z-config.h.bak > z-config.h
24 cp "main.c" "main.c.bak"
25 sed -e 's@strcpy(path, "./lib/");@strcpy(path, "/usr/lib/zangband/");@' main.c.bak > main.c
27 cd "$startdir/src/$pkgname"
29 ./configure --prefix=/usr/lib/ --with-gtk=no
32 install -d "$startdir/pkg/usr/bin" "$startdir/pkg/usr/lib/$pkgname"
33 install -D -m755 "$pkgname" "$startdir/pkg/usr/bin/$pkgname"
34 cp -R "$startdir/src/$pkgname/lib" "$startdir/pkg/usr/lib"
35 rename "$startdir/pkg/usr/lib/lib" "$startdir/pkg/usr/lib/$pkgname" "$startdir/pkg/usr/lib/lib"
36 chmod -R 775 "$startdir/pkg/usr/lib/$pkgname"
37 chown -R root:users "$startdir/pkg/usr/lib/$pkgname"
39 find "$startdir/pkg/usr/lib/$pkgnam" -name makefile.zb -exec rm {} \;
40 find "$startdir/pkg/usr/lib/$pkgname" -type f -exec chmod a-x {} \;
41 install -D -m644 "$startdir/src/LICENSE" "$startdir/pkg/usr/share/licenses/$pkgname/LICENSE"