updated on Mon Jan 23 00:00:36 UTC 2012
[aur-mirror.git] / vultureseye / PKGBUILD
blob644ff7840fd4adbc4669365ee17b991bc94ccad4
1 # Contributor: Anton Bazhenov <anton.bazhenov at gmail>
2 # Maintainer: Lone_Wolf <lonewolf@xs4all.nl>
3 # Maintainer: denton <e9203.00 gmail>
4 pkgname=vultureseye
5 pkgver=2.2.100
6 pkgrel=2
7 pkgdesc='An isometric graphical interface for the NetHack game'
8 arch=(any)
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)
17 build() {
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
39   
40   sh sys/unix/setup.sh
41   make || return 1
42   make PREFIX=$pkgdir/usr install
43   
44   chgrp -R games $pkgdir/var/games
45   chmod -R 775   $pkgdir/var/games
46   chmod    664   $pkgdir/var/games/$pkgname/{logfile,perm,record}
48   cd $pkgdir/usr
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}