1 # Contributor: Jens Staal <staal1978@gmail.com>
5 pkgdesc="A classic board game from Abandonia, played in Wine."
6 url='http://www.abandonia.com/en/games/308/Battle+Chess.html'
8 license=('custom-freeware' 'Abandonware')
9 install=battle-chess.install
11 optdepends=('abandonia-menu')
12 # http://files.abandonia.com/download.php?game=Battle+Chess&secure=3ec224f02d7fddbeec7bcd5a1e004a25&td=1298229952
13 source=('Battle Chess.zip' 'battle-chess.png')
14 sha256sums=('57241ab10d6eef14fc8d5f8197253782c479b0c029f1efd648b6e1c0974ec4fe'
15 'a5edc3a69d98da5a41551dd127c0a3b0709a00460fe66173e8df95c130b18052')
18 _icon="battle-chess.png"
21 mkdir -p -m755 "$pkgdir/opt/"
22 mkdir -p -m755 "$pkgdir/opt/abandonia"
23 mkdir -p -m755 "$pkgdir/opt/abandonia/$_pkgabbrev"
25 cp -ar $srcdir/chess/* "$pkgdir/opt/abandonia/$_pkgabbrev"
27 #ok, let's use a script to start the game
29 mkdir -p -m755 /$pkgdir/usr/bin/
33 WINEARCH=win32 WINEPREFIX=~/.abandonia/$_pkgabbrev wine /opt/abandonia/$_pkgabbrev/$_exe
34 " >> /$pkgdir/usr/bin/$_pkgabbrev.sh
37 WINEPREFIX=~/.abandonia/$_pkgabbrev wine /opt/abandonia/$_pkgabbrev/$_exe
38 " >> /$pkgdir/usr/bin/$_pkgabbrev.sh
41 chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh
42 ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev
44 # Automatic generation of a .desktop file
46 mkdir -p -m644 "$pkgdir/usr/share/"
47 mkdir -p -m644 "$pkgdir/usr/share/applications/"
49 printf "[Desktop Entry]
54 Exec=/usr/bin/$_pkgabbrev
55 Icon=/opt/abandonia/$_pkgabbrev/$_icon
56 Categories=Game;Abandonia;
58 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop