updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / spring-git / PKGBUILD
blob1940cb89a1a304455acd1cd7753611455dceac5a
1 # Contributor: Antti Oja <antti.bofh@gmail.com>
3 pkgname=spring-git
4 pkgver=20100205
5 pkgrel=1
6 pkgdesc="A free 3D real-time-strategy (RTS) game engine. Development branch."
7 arch=('i686' 'x86_64')
8 url="http://springrts.com/"
9 license=('GPL2')
10 provides=('spring' 'spring-git')
11 depends=('openal' 'glew' 'boost' 'devil' 'libvorbis' 'freetype2' 'sdl')
12 makedepends=('git' 'cmake' 'p7zip')
13 conflicts=('spring' 'spring-svn')
14 source=()
15 md5sums=()
17 _gitroot="git://github.com/spring/spring.git"
18 _gitname="spring"
20 build() {
21   cd ${srcdir}
22   msg "Connecting to github.com GIT server...."
24   if [ -d ${srcdir}/$_gitname ] ; then
25   cd $_gitname && git pull origin
26   msg "The local files are updated."
27   else
28   git clone $_gitroot
29   fi
31   msg "GIT checkout done or server timeout"
33   msg "Creating build directory"
34   if [ -d "${srcdir}/$_gitname-build" ]; then rm -rf "${srcdir}/$_gitname-build"; fi
35   cp -R "${srcdir}/$_gitname" "${srcdir}/$_gitname-build"
37   msg "Starting make..."
38   cd "${srcdir}/$_gitname-build"
39   cmake -DCMAKE_INSTALL_PREFIX=/usr . || return 1
41     cmake \
42         -DCMAKE_INSTALL_PREFIX=/usr \
43         -DUSE_GML=true \
44         -DUSE_GML_SIM=true \
45 #       -DUSE_GML_DEBUG=true \
46         -DDATADIR=share/spring .
48     make || return 1
49     make DESTDIR=$pkgdir install || return 1
51     install -d $pkgdir/etc/spring
52     echo '$HOME/.spring' > $pkgdir/etc/spring/datadir