updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / reunion-1 / PKGBUILD
blobdf1884c36c0d8bc9ea0a37a4f3f261059bb0ec31
1 # Contributor: WFCody
2 # Contributor: Nicolas Barbey <nicolas.a.barbey@gmail.com>
4 pkgname="reunion-1"
5 pkgver="1.0"
6 pkgrel=5
7 pkgdesc="A classic sci-fi strategy game from Abandonia, played in DosBox."
8 url='http://www.abandonia.com/en/games/150/Reunion.html'
9 arch=('any')
10 license=('custom-freeware' 'Abandonware')
11 install='reunion.install'
12 depends=('dosbox' 'unionfs-fuse')
13 optdepends=('abandonia-menu')
14 source=('http://files.abandonia.com/download.php?game=Reunion&secure=07cdba8f0450ca77c4c85be721ac5d80&td=1298304936')
15 md5sums=('f1f3c2734d3eff59b6d47dd64f70d66c')
16 _pkgabbrev="reunion"
17 _exe="start.exe"
18 _icon="/ICON/ICONMAIN.PIC"
20 build() {
21         mkdir -p -m755 "$pkgdir/opt/" 
22         mkdir -p -m755 "$pkgdir/opt/abandonia" 
23         mkdir -p -m755 "$pkgdir/opt/abandonia/$_pkgabbrev" 
24         rm -f $srcdir/download* 
25         cp -ar $srcdir/* "$pkgdir/opt/abandonia/$_pkgabbrev" 
27         #ok, let's use a script to start the game
29         mkdir -p -m755 /$pkgdir/usr/bin/ 
31         printf "#!${SHELL}
32 if whereis unionfs-fuse>/dev/null 2>&1;
33   then
34     if whereis dosbox>/dev/null 2>&1;
35         then
36                 mkdir -p ~/.abandonia/$_pkgabbrev/persistent
37                 mkdir ~/.abandonia/$_pkgabbrev/temp
38                 unionfs -o cow -o umask=000 ~/.abandonia/$_pkgabbrev/persistent=RW:/opt/abandonia/$_pkgabbrev=RO ~/.abandonia/$_pkgabbrev/temp
39                 dosbox ~/.abandonia/$_pkgabbrev/temp/$_exe
40                 fusermount -u ~/.abandonia/$_pkgabbrev/temp
41         else
42                 echo '==> Please get sure to have dosbox installed and have it in your PATH array.'
43     fi
44   else
45     echo '==> Please get sure to have unionfs-fuse installed and have it in your PATH array.'
47 return \$?" >> /$pkgdir/usr/bin/$_pkgabbrev.sh 
49         chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh 
50         ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev 
52         # Automatic generation of a .desktop file
54         mkdir -p -m644 "$pkgdir/usr/share/" 
55         mkdir -p -m644 "$pkgdir/usr/share/applications/" 
57         printf "[Desktop Entry]
58 Version=$pkgver
59 Type=Application
60 Name=$pkgname
61 Comment=$pkgdesc
62 Exec=/usr/bin/$_pkgabbrev
63 Icon=/opt/abandonia/$_pkgabbrev/$_icon
64 Categories=Game;Abandonia;
65 Terminal=false
66 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop