1 # Contributor: Jens Staal <staal1978@gmail.com>
6 pkgdesc="A classic adventure game from Abandonia, played in ScummVM."
7 url='http://www.abandonia.com/en/games/878/Discworld.html'
9 license=('custom-freeware' 'Abandonware')
10 install='discworld.install'
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"
21 rm -f $srcdir/download*
23 echo "Do not worry, after setup just type"
25 echo "at the DOS prompt to continue with the packaging"
26 dosbox $srcdir/INSTALL.EXE
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/
45 if whereis scummvm>/dev/null 2>&1;
47 mkdir -p ~/.abandonia/$_pkgabbrev
48 scummvm -F --savepath=~/.abandonia/$_pkgabbrev --path=/opt/abandonia/$_pkgabbrev/ $_exe
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]
66 Exec=/usr/bin/$_pkgabbrev
67 Icon=/opt/abandonia/$_pkgabbrev/$_icon
68 Categories=Game;Abandonia;
70 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop