updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / discworld / PKGBUILD
blob55c605c1c10a3d04fcb486f8fee700dec80f29e6
1 # Contributor: Jens Staal <staal1978@gmail.com>
3 pkgname="discworld"
4 pkgver="1.0"
5 pkgrel=7
6 pkgdesc="A classic adventure game from Abandonia, played in ScummVM."
7 url='http://www.abandonia.com/en/games/878/Discworld.html'
8 arch=('any')
9 license=('custom-freeware' 'Abandonware')
10 install='discworld.install'
11 depends=('scummvm')
12 makedepends=('dosbox')
13 optdepends=('abandonia-menu')
14 source=('http://files.abandonia.com/download.php?game=Discworld&secure=b8ccf50cc13de6e4f333e2469df4a201&td=1297693940' 'discworld.jpg')
15 md5sums=('c74b28e6cab2fb51dbc41701a92fe63b' '038f2e32f04b09d1b157a1a2d14e5b68')
16 _pkgabbrev="discworld"
17 _exe="DW"
18 _icon="discworld.jpg"
20 build() {
21         rm -f $srcdir/download*
23         echo "Do not worry, after setup just type"
24         echo "exit"
25         echo "at the DOS prompt to continue with the packaging"
26         dosbox $srcdir/INSTALL.EXE
29 package() {
30         mkdir -p -m755 "$pkgdir/opt/"
31         mkdir -p -m755 "$pkgdir/opt/abandonia"
32         mkdir -p -m755 "$pkgdir/opt/abandonia/$_pkgabbrev"
34         cp -ar $srcdir/DISCWLD/* "$pkgdir/opt/abandonia/$_pkgabbrev"
35         cp -ar $srcdir/$_icon $pkgdir/opt/abandonia/$_pkgabbrev
37         #ok, let's use a script to start the game
38         #change -F to -f if you want the game to run in full-screen as default.
40         mkdir -p -m755 /$pkgdir/usr/bin/
42         chmod -R 755 $pkgdir/opt/abandonia/$_pkgabbrev/
44         printf "#!${SHELL}
45 if whereis scummvm>/dev/null 2>&1;
46         then
47                 mkdir -p ~/.abandonia/$_pkgabbrev
48                 scummvm -F --savepath=~/.abandonia/$_pkgabbrev --path=/opt/abandonia/$_pkgabbrev/ $_exe
49         else
50                 echo '==> Please get sure to have ScummVM installed and have it in your PATH array.'
52 return \$?" >> /$pkgdir/usr/bin/$_pkgabbrev.sh
53         chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh
54         ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev
56         # Automatic generation of a .desktop file
58         mkdir -p -m644 "$pkgdir/usr/share/"
59         mkdir -p -m644 "$pkgdir/usr/share/applications/"
61         printf "[Desktop Entry]
62 Version=$pkgver
63 Type=Application
64 Name=$pkgname
65 Comment=$pkgdesc
66 Exec=/usr/bin/$_pkgabbrev
67 Icon=/opt/abandonia/$_pkgabbrev/$_icon
68 Categories=Game;Abandonia;
69 Terminal=false
70 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop
71