updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / battle-chess / PKGBUILD
blobc24af5a7518ed1763eeb05e31ede9054d9348964
1 # Contributor: Jens Staal <staal1978@gmail.com>
2 pkgname=battle-chess
3 pkgver=1.0
4 pkgrel=3
5 pkgdesc="A classic board game from Abandonia, played in Wine."
6 url='http://www.abandonia.com/en/games/308/Battle+Chess.html'
7 arch=('i686' 'x86_64')
8 license=('custom-freeware' 'Abandonware')
9 install=battle-chess.install
10 depends=('wine')
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')
16 _pkgabbrev="bchess"
17 _exe="CHESS.EXE"
18 _icon="battle-chess.png"
20 build() {
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/ 
30 if ${CARCH}=x86_64
31 then
32         printf "#!${SHELL}
33                 WINEARCH=win32 WINEPREFIX=~/.abandonia/$_pkgabbrev wine /opt/abandonia/$_pkgabbrev/$_exe
34         " >> /$pkgdir/usr/bin/$_pkgabbrev.sh 
35 else
36         printf "#!${SHELL}
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]
50 Version=$pkgver
51 Type=Application
52 Name=$pkgname
53 Comment=$pkgdesc
54 Exec=/usr/bin/$_pkgabbrev
55 Icon=/opt/abandonia/$_pkgabbrev/$_icon
56 Categories=Game;Abandonia;
57 Terminal=false
58 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop
60