updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / legend-of-kyrandia-1 / PKGBUILD
blob5d994599c228186277e8bbc75861eb8409b00f7f
1 # Contributor: Jens Staal <staal1978@gmail.com>
3 pkgname="legend-of-kyrandia-1"
4 pkgver="1.0"
5 pkgrel=5
6 pkgdesc="A classic adventure game from Abandonia, played in ScummVM."
7 url='http://www.abandonia.com/en/games/88/Legend+of+Kyrandia+1,+The.html'
8 arch=('any')
9 license=('custom-freeware' 'Abandonware')
10 depends=('scummvm')
11 optdepends=('abandonia-menu')
12 install='kyrandia1.install'
13 source=('http://files.abandonia.com/download.php?game=Legend+of+Kyrandia+1%2C+The&secure=ae25b70ce9dc58743433d6dbfc2a706e&td=1297713450' 'http://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-2-1/dists/engine-data/kyra.dat')
14 md5sums=('ab1203fd69d275f5d1a03c22a503ba75' 'a81223603341f8c59285753e91665e2f')
15 _pkgabbrev="Kyrandia1"
16 _exe="kyra1"
17 _icon="KYRANDIA.ICO"
19 build() {
20         mkdir -p -m755 "$pkgdir/opt/"
21         mkdir -p -m755 "$pkgdir/opt/abandonia"
22         mkdir -p -m755 "$pkgdir/opt/abandonia/$_pkgabbrev"
23         cp -ar $srcdir/* "$pkgdir/opt/abandonia/$_pkgabbrev"
24         cp -ar $srcdir/kyra.dat $pkgdir/opt/abandonia/$_pkgabbrev/KYRA.DAT
26         #ok, let's use a script to start the game
28         mkdir -p -m755 /$pkgdir/usr/bin/
30         printf "#!${SHELL}
31 if whereis scummvm>/dev/null 2>&1;
32         then
33                 mkdir ~/.abandonia/$_pkgabbrev
34                 scummvm -F --savepath=~/.abandonia/$_pkgabbrev --path=/opt/abandonia/$_pkgabbrev/ $_exe
35         else
36                 echo '==> Please get sure to have ScummVM installed and have it in your PATH array.'
38 return \$?" >> /$pkgdir/usr/bin/$_pkgabbrev.sh
39         chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh
40         ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev
42         # Automatic generation of a .desktop file
44         mkdir -p -m644 "$pkgdir/usr/share/"
45         mkdir -p -m644 "$pkgdir/usr/share/applications/"
47         printf "[Desktop Entry]
48 Version=$pkgver
49 Type=Application
50 Name=$pkgname
51 Comment=$pkgdesc
52 Exec=/usr/bin/$_pkgabbrev
53 Icon=/opt/abandonia/$_pkgabbrev/$_icon
54 Categories=Game;Abandonia;
55 Terminal=false
56 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop
57