1 # Contributor: SaThaRiel <sathariel74[at]gmail[dot]com>
5 pkgdesc="Its purpose is to add a little flavor and character to Vanilla Angband. This is done mostly through redoing the monster list and adding a few new classes and races. Other changes are mainly to complement the changes in the monster list and new classes."
7 url="http://sites.google.com/site/dajangbandwebsite/home"
9 depends=('ncurses' 'libx11')
10 source=("DaJAngband132b.zip::http://sites.google.com/site/dajangbandwebsite/home/download-page/DaJAngband132b.zip?attredirects=0")
11 md5sums=('e320d1f84215bd3c66c2bffd8b7c60a8')
14 cd $srcdir/DaJAngband132b/src
15 # Change the standard build parameters
16 sed -e 's/SYS_gcu\ \=\ \-DUSE_GCU\ \-DUSE_NCURSES\ \-lncurses/SYS_gcu\ \=\ \-DUSE_GCU\ \-DUSE_CURSES\ \-lcurses/g' Makefile.std > Makefile.tmp
17 # Change the file of the executable
18 sed -e 's/EXE\ \=\ angband/EXE\ \=\ dajangband/' Makefile.tmp > Makefile
19 # Fix the build via Makefile.src and Makefile.inc to run under Linux
20 sed -e '12{s/z-form.h/z-form.h z-queue.h/};16{s/z-virt.o/z-virt.o z-queue.o/}' Makefile.src > Makefile.src2
21 mv Makefile.src2 Makefile.src
22 sed -e '22az-queue.o: z-queue.h' Makefile.inc > Makefile.inc2
23 mv Makefile.inc2 Makefile.inc
24 # Fix the lib path to be in a good location
25 mv config.h config.h.org
26 sed -e 's/\#\ define\ DEFAULT_PATH\ \"\.\/lib\/\"/\#\ define\ DEFAULT_PATH\ \"\/usr\/lib\/dajangband\/\"/' config.h.org > config.h
27 # get rid of the comment in comment warnings from gcc
28 mv defines.h defines.h.org
29 sed -e '/^\/\*.*\/\*.*/d' defines.h.org > defines.h
31 # start the build and install
33 install -d "$pkgdir/usr/bin/" || return 1
34 install -d "$pkgdir/usr/lib/$pkgname" || return 1
35 cp -p ../$pkgname "$pkgdir/usr/bin/" || return 1
36 cp -rp ../lib/* "$pkgdir/usr/lib/$pkgname/" || return 1
37 chown -R root:games "$pkgdir/usr/lib/$pkgname/"
38 chmod 775 "$pkgdir/usr/lib/$pkgname/apex"
39 chmod 775 "$pkgdir/usr/lib/$pkgname/save"
40 chmod 775 "$pkgdir/usr/lib/$pkgname/data"
41 find $pkgdir/usr/lib/$pkgname/ -name delete.me -exec rm {} \;
42 find $pkgdir/usr/lib/$pkgname/ -name 'Makefile*' -exec rm {} \;