1 # Contributor: Anton Bazhenov <anton.bazhenov at gmail>
2 # Maintainer: Lone_Wolf <lonewolf@xs4all.nl>
3 # Maintainer: denton <e9203.00 gmail>
7 pkgdesc='An isometric graphical interface for the NetHack game'
9 url=http://clivecrous.github.com/vultures
10 license=(custom:NetHack General Public Licence)
11 depends=(hicolor-icon-theme libpng sdl_mixer sdl_ttf)
12 makedepends=(bison flex p7zip)
13 install=$pkgname.install
14 source=(http://cloud.github.com/downloads/clivecrous/vultures/vultures-$pkgver-full.7z)
15 md5sums=(6180d77089c273b026eb1e0ce356ef38)
18 7z x -y vultures-$pkgver-full.7z
20 cd vultures-$pkgver/nethack
21 sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
22 -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' \
23 -e 's|^/\* \(#define VAR_PLAYGROUND.*\) \*/|\1|' \
24 -e "/^#define VAR_PLAYGROUND/ s|/var/lib/games/nethack|/var/games/$pkgname|" -i include/unixconf.h
26 sed -e '/^GAMEDIR/ s|$(PREFIX)/games/lib/$(GAME)dir|$(PREFIX)/share/$(GAME)|' \
27 -e '/^VARDIR/ s|$(GAMEDIR)|$(PREFIX)/../var/games/$(GAME)|' \
28 -e '/^SHELLDIR/ s|$(PREFIX)/games|$(PREFIX)/bin|' \
29 -e '/^GAMEUID/ s|games|root|' \
30 -e '/^GAMEGRP/ s|bin|root|' \
31 -e '/^GAMEPERM/ s|04755|0755|' -i sys/unix/Makefile.top
33 sed -e "/^# define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/$pkgname|" \
34 -e '/^#define COMPRESS/ s|/usr/bin/compress|/bin/gzip|' \
35 -e '/^#define COMPRESS_EXTENSION/ s|.Z|.gz|' -i include/config.h
37 sed -e "/^HACK/ s|\$HACKDIR/nethack|/usr/bin/$pkgname|" \
38 -e "/^HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/$pkgname|" -i sys/unix/nethack.sh
42 make PREFIX=$pkgdir/usr install
44 chgrp -R games $pkgdir/var/games
45 chmod -R 775 $pkgdir/var/games
46 chmod 664 $pkgdir/var/games/$pkgname/{logfile,perm,record}
49 mv bin/$pkgname{,-start}
50 mv share/$pkgname/$pkgname bin/$pkgname
51 mv share/$pkgname/recover bin/$pkgname-recover
53 install -Dm644 share/$pkgname/license share/licenses/$pkgname/LICENSE
54 install -Dm644 $srcdir/vultures-$pkgver/vultures/gamedata/nh_icon.png share/icons/hicolor/48x48/apps/$pkgname.png
55 install -Dm644 $srcdir/vultures-$pkgver/dist/linux/$pkgname.desktop share/applications/$pkgname.desktop
57 rm share/$pkgname/{*.{ico,png,nh},license}