updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / armagetronad-svn / PKGBUILD
blobd14bb1e013eda15e8e0aa49bd7147b8352a9d22e
1 # Maintainer: andy123 < ajs AT online DOT de >
2 # Contributor: Filippo 'JoeyrS' Civiletti <joeyrs@gmail.com>
3 # Contributor: Mateusz Herych <heniekk@gmail.com>
5 pkgname=armagetronad-svn
6 pkgver=10069
7 pkgrel=1
8 pkgdesc='A Tron Clone in 3D - svn version'
9 arch=('i686' 'x86_64')
10 url='http://armagetronad.net/'
11 license=('GPL')
12 depends=('sdl_image' 'libxml2' 'sdl_mixer' 'mesa' 'ftgl' 'protobuf' python2 glew boost-libs)
13 makedepends=('subversion' 'protobuf' python2)
14 conflicts=(armagetronad)
15 replaces=(armagetronad)
16 provides=(armagetronad)
17 source=(armagetronad.desktop)
18 sha1sums=('07068b07eadf30df934bad5969a831c3cecc3c7c')
19 _svntrunk="https://armagetronad.svn.sourceforge.net/svnroot/armagetronad/armagetronad/trunk/armagetronad"
20 _svnmod="armagetronad"
22 build() {
23         msg "Starting SVN checkout..."
24           cd ${srcdir}
25             if [ -d $_svnmod/.svn ]; then
26               (cd $_svnmod && svn up)
27              else
28               svn co $_svntrunk $_svnmod
29         fi
30         msg "SVN checkout done or server timeout"
32         msg "Starting make..."
33           if [ -d ${srcdir}/$_svnmod-build ]; then
34             rm -rf $_svnmod-build
35           fi
37           cp -r $_svnmod $_svnmod-build
38           cd $_svnmod-build
39         
40         ./bootstrap.sh
42         # python2 fix
43         sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' language/update.py
44         sed -i 's|#!/usr/bin/env PYTHON|#!/usr/bin/python2|' batch/make/copyresources.py
46         sed -i 's|FTGL.h|ftgl.h|g' configure
47         sed -i 's|png_check_sig|png_sig_cmp|g' configure
49         ./configure --prefix=/usr \
50                 --sysconfdir=/etc \
51                 --mandir=/usr/share/man \
52                 --disable-games \
53                 --enable-automakedefaults
54         sed -i 's|python|python2|' Makefile
55         sed -i 's|python|python2|' resource/Makefile
56         make
59 package(){
60         cd $srcdir/$_svnmod-build
61         make DESTDIR=$pkgdir install
62         install -D -m 644 $srcdir/armagetronad.desktop $pkgdir/usr/share/applications/armagetronad.desktop
63         rm -rf $pkgdir/usr/share/applnk
64         rm $pkgdir/usr/bin/armagetronad-uninstall
65         mv $pkgdir/usr/bin/armagetronad $pkgdir/usr/bin/armagetronad_bin
66         printf "#!/bin/bash\n/usr/bin/armagetronad_bin --configdir /etc/armagetronad --datadir /usr/share/armagetronad" > $pkgdir/usr/bin/armagetronad
67         chmod +x $pkgdir/usr/bin/armagetronad
68         rm -r $pkgdir/usr/share/armagetronad/resource/included/*/.svn $pkgdir/usr/share/armagetronad/resource/included/*/*/.svn