1 # Contributor: Jens Staal <staal1978@gmail.com>
3 pkgname="starwars-chess"
6 pkgdesc="A classic board game from Abandonia, played in DosBox."
7 url='http://www.abandonia.com/en/games/5205/Star+Wars+Chess.html'
9 license=('custom-freeware' 'Abandonware')
10 install='sw-chess.install'
12 optdepends=('abandonia-menu')
13 source=('http://files.abandonia.com/download.php?game=Star+Wars+Chess&secure=125b31951f5eeee46906b9561cf1ece6&td=1298144186' 'sw-chess.png')
14 md5sums=('27ebd9fbbbd22b7c0f1b6117f2464a58' 'b890bf1804f3dee268158e04c4e1a841')
20 mkdir -p -m755 "$pkgdir/opt/"
21 mkdir -p -m755 "$pkgdir/opt/abandonia"
22 mkdir -p -m755 "$pkgdir/opt/abandonia/$_pkgabbrev"
23 rm -f $srcdir/download*
24 cp -ar $srcdir/SWCHESS/* "$pkgdir/opt/abandonia/$_pkgabbrev"
26 #ok, let's use a script to start the game
28 mkdir -p -m755 /$pkgdir/usr/bin/
31 mkdir -p ~/.abandonia/$_pkgabbrev
33 if whereis dosbox>/dev/null 2>&1;
35 dosbox /opt/abandonia/$_pkgabbrev/$_exe mount c ~/.abandonia/$_pkgabbrev
37 echo '==> Please get sure to have dosbox installed and have it in your PATH array.'
39 return \$?" >> /$pkgdir/usr/bin/$_pkgabbrev.sh
40 chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh
41 ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev
43 # Automatic generation of a .desktop file
45 mkdir -p -m644 "$pkgdir/usr/share/"
46 mkdir -p -m644 "$pkgdir/usr/share/applications/"
48 printf "[Desktop Entry]
53 Exec=/usr/bin/$_pkgabbrev
54 Icon=/opt/abandonia/$_pkgabbrev/$_icon
55 Categories=Game;Abandonia;
57 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop