updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / armyops / PKGBUILD
blob6b4f0da2633d94cb7bcc28dd282ea8a41b92ca90
1 # Contributor: Zerial <fernando@zerial.org>
2 # Contributor: Peter Baldwin <bald_pete@hotmail.com>
4 pkgname=armyops
5 pkgver=2.5.0
6 _pkgver=250
7 pkgrel=3
8 pkgdesc="America's Army tactical FPS"
9 url="http://www.americasarmy.com/"
10 depends=(x-server)
11 license=(custom)
12 source=(http://treefort.icculus.org/armyops/${pkgname}${_pkgver}-linux.run )
13 md5sums=('f0ebbc449aeb6be5fcdf68885d79d57a')
14 arch=("i686")
15 build() {
16   mkdir -p $startdir/pkg/opt/armyops
17   mkdir -p $startdir/pkg/usr/bin
18   mkdir -p $startdir/pkg/usr/share/applications
19   cd $startdir/src
20   chmod +x ${pkgname}${_pkgver}-linux.run
22   # only extract if neccessary (to speed up builds)
23   if [ ! -e ${pkgname}${_pkgver}.tar.bz2 ]
24   then ./${pkgname}${_pkgver}-linux.run --noexec --target $startdir/src
25   fi
26   tar -C $startdir/pkg/opt/${pkgname} -j -x -f binaries.tar.bz2
27   tar -C $startdir/pkg/opt/${pkgname} -j -x -f ${pkgname}${_pkgver}.tar.bz2
29   chown -R root:root $startdir/pkg/opt/${pkgname}
30   chmod -R go-w $startdir/pkg/opt/${pkgname}
31   
32   echo "[Desktop Entry]
33 Name=America's Army
34 Comment=A tactical first-person shooter
35 Icon=/opt/armyops/Help/AAO.ico
36 Exec=/usr/bin/armyops
37 Terminal=false
38 Type=Application
39 Categories=Application;Game
40 StartupNotify=true
41 " > $startdir/pkg/usr/share/applications/${pkgname}.desktop
42   chmod 644 $startdir/pkg/usr/share/applications/${pkgname}.desktop
44   echo '#!/bin/sh
45 cd /opt/armyops/System/
46 ./armyops-bin $*' > $startdir/pkg/usr/bin/${pkgname}
47   chmod 755 $startdir/pkg/usr/bin/${pkgname}
49   echo '#!/bin/sh
50 cd /opt/armyops/System/
51 ./server-bin $*' > $startdir/pkg/usr/bin/${pkgname}d
52   chmod 755 $startdir/pkg/usr/bin/${pkgname}d
54