updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / revengeofthetitans / PKGBUILD
blob6347fd93fc8614acaeb0255f97ebad306c54ee87
1 # Maintainer: Marek Otahal <markotahal gmail>
2 # Contributor: Artificial Intelligence <polarbeard@gmail.com>
4 pkgname="revengeofthetitans"
5 pkgver=1.80.15.1
6 _version=180151
7 pkgrel=1
8 pkgdesc="Construct and command your ground defences in a series of increasingly massive battles across the solar system, in our frenetic arcade mash-up of Real Time Strategy and Tower Defence!"
9 arch=("i686" "x86_64")
10 url="http://www.puppygames.net/revenge-of-the-titans/"
11 license=("custom")
12 depends=("java-runtime" "openal")
13 provides=("rott")
14 replaces=("rott-demo" "revengeofthetitans-demo")
15 _gamepkg="RevengeOfTheTitans-HIB-${_version}-i386.tar.gz"
16 _gamepkg2='RevengeOfTheTitans-i386.tar.gz'
17 if [[ $CARCH == x86_64 ]]; then
18   _gamepkg="RevengeOfTheTitans-HIB-${_version}-amd64.tar.gz"
19   _gamepkg2='RevengeOfTheTitans-amd64.tar.gz'
22 source=('revenge.desktop')
23 md5sums=('fdcb3b983e849688a2c4ca1a86151a53')
25 # disable compression (alr compr.)
26 PKGEXT='.pkg.tar'
28 build() {
29   cd $srcdir
31   msg "You need a full copy of this game in order to install it"
32   msg "Searching for \"${_gamepkg}\" or \"${_gamepkg2}\" \
33   in dir: $(readlink -f $startdir)"
34   pkgpath=$startdir
36   if [[ ! ( -f "$startdir/${_gamepkg}" ||  -f "$startdir/${_gamepkg2}" ) ]]; then
37     error "Game package not found, please type absolute path to game setup package (/home/joe):"
38     read pkgpath
39     if [[ ! ( -f "${pkgpath}/${_gamepkg}" || ! -f "${pkgpath}/${_gamepkg2}" ) ]]; then
40        error "Unable to find game package." && return 1
41     fi
42   fi
43   msg "Found game package, installing..."
45  # ln -fs "${pkgpath}/${_gamepkg}" . || ln -fs "${pkgpath}/${_gamepkg2}" . || return 1
46  # tar xzf ${srcdir}/${_gamepkg} || tar xzf ${srcdir}/${_gamepkg2} || return 1
47   
48   if [[ ( -f "${pkgpath}/${_gamepkg}")]];then
49     ln -fs "${pkgpath}/${_gamepkg}" .
50     tar xzf ${srcdir}/${_gamepkg}
51   fi
52   if [[ ( -f "${pkgpath}/${_gamepkg2}")]];then
53     ln -fs "${pkgpath}/${_gamepkg2}" .
54     tar xzf ${srcdir}/${_gamepkg2}
55   fi
57         sed -ri "s|^(INSTDIR=\")[^\"]+|\1/opt/rott/|" revengeofthetitans/revenge.sh
60 package() {
61         cd revengeofthetitans
63         install -d ${pkgdir}/opt/rott \
64                 ${pkgdir}/usr/bin \
65                 ${pkgdir}/usr/share/{applications,pixmaps}
67         install -m755 revenge.sh \
68                 ${pkgdir}/usr/bin/revenge
69         install -m755 *.so \
70                 ${pkgdir}/opt/rott
71         install -m644 *.{jar,png} \
72                 ${pkgdir}/opt/rott
73         install -m644 ${srcdir}/revenge.desktop \
74                 ${pkgdir}/usr/share/applications/revenge.desktop
75         # Install Icon
76         install -D -m 644 $pkgdir/opt/rott/revenge.png $pkgdir/usr/share/pixmaps/Revenge.png
79 # vim: set noet ff=unix: