updated on Mon Jan 23 04:00:55 UTC 2012
[aur-mirror.git] / heretic / PKGBUILD
blob4e742bf49852df29f02f8d4794aa8d08bb74b7c7
1 pkgname=heretic
2 pkgver=1.0
3 pkgrel=1
4 pkgdesc="Heretic 3D shooter game"
5 arch=(any)
6 url="http://oldgames.ru"
7 license=('custom')
8 depends=(dosbox bash)
9 makedepends=(unrar)
10 source=('http://oldgames.ru:8080/H/heretic.rar')
11 md5sums=('9e3ff522a3db4704cfc2bcd5ddc15b06')
13 build() {
14   cd "$srcdir/"
15   unrar x 'heretic.rar' || return 1
17   local game=heretic
19   mkdir -p $pkgdir/usr/share/ $pkgdir/usr/bin/
20   cp -r HERETIC $pkgdir/usr/share/$game || return 1
22   cat >$pkgdir/usr/bin/$game <<EOF
23 #!/bin/sh
25 if [ ! -d ~/.dosbox/$game ]; then
26         mkdir -p ~/.dosbox/$game
27         cd ~/.dosbox/$game
28         ls -1 /usr/share/$game | while read A; do
29                 ln -s /usr/share/$game/\$A \$A
30         done
32         rm -f HERETIC.CFG MODEM.CFG
33         cp /usr/share/$game/HERETIC.CFG /usr/share/$game/MODEM.CFG ./
35 cd ~/.dosbox/$game
36 dosbox -c 'mount c ~/.dosbox/$game' -c 'c:' -c '$game' -c 'exit'
37 EOF
39   chmod 0755 $pkgdir/usr/bin/$game