updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / recastnavigation-svn / PKGBUILD
blobdfdbe317b1a96584018567fc19b054e4449ae0bc
1 # Maintainer: Gunnar Kriik <gunnar.kriik@gmail.com>
2 # Contributor: krigun
4 pkgname=recastnavigation-svn
5 pkgrel=1
6 pkgver=141
7 pkgdesc="Navigation-mesh Construction Toolset for Games"
8 arch=('i686' 'x86_64')
9 url="http://code.google.com/p/recastnavigation"
10 license=('MIT')
11 groups=()
12 depends=('sdl')
13 makedepends=('subversion' 'cmake' 'sdl')
15 source=('cmake.patch')
16 md5sums=('e82b8e968a30eb5cf3f63bb50f2f9158')
18 _svntrunk="http://recastnavigation.googlecode.com/svn/trunk"
19 _svnmod=recastnavigation-svn
21 build() {
22   cd ${srcdir} || return 1
24   # Checkut from SVN
25   if [ -d ${_svnmod}/.svn ]; then
26     (cd ${_svnmod} && svn up)
27   else
28     svn co -r ${pkgver} ${_svntrunk} ${_svnmod}
29   fi
31   cd ${_svnmod}
33   # Patch that creates a set of CMake build files
34   patch -p1 < ../cmake.patch
35   mkdir build ; cd build/
37   # Build the libraries and the demo app
38   cmake .. ; make || return 1
39   
40   # Create package directory structure
41   mkdir -p $pkgdir/usr/include
42   mkdir -p $pkgdir/usr/lib
43   mkdir -p $pkgdir/usr/share/recastnavigation
45   # Copy shared libraries
46   cp bin/libRecast.so $pkgdir/usr/lib
47   cp bin/libDetour.so $pkgdir/usr/lib
48   cp bin/libDebugUtils.so $pkgdir/usr/lib
50   # Copy headers
51   cp ${srcdir}/${_svnmod}/Recast/Include/* $pkgdir/usr/include
52   cp ${srcdir}/${_svnmod}/Detour/Include/* $pkgdir/usr/include
53   cp ${srcdir}/${_svnmod}/DebugUtils/Include/* $pkgdir/usr/include
55   # Copy demo application to "/usr/share/recastnavigation"
56   mkdir -p $pkgdir/usr/share/recastnavigation
57   cp bin/RecastDemo $pkgdir/usr/share/recastnavigation
58   cp bin/DroidSans.ttf $pkgdir/usr/share/recastnavigation/DroidSans.ttf
59   cp bin/test.chf $pkgdir/usr/share/recastnavigation/test.chf
60   cp -R bin/Meshes $pkgdir/usr/share/recastnavigation/Meshes
61   cp -R bin/Tests $pkgdir/usr/share/recastnavigation/Tests