updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / g2o-svn / PKGBUILD
blob80c505abf59566e78c4cf61eb7b9183985c30079
1 # This is an example PKGBUILD file. Use this as a start to creating your own,
2 # and remove these comments. For more information, see 'man PKGBUILD'.
3 # NOTE: Please fill out the license field for your package! If it is unknown,
4 # then please put 'unknown'.
6 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
7 # for more information on packaging from SVN sources.
9 # Maintainer: Your Name <youremail@domain.com>
10 pkgname=g2o-svn
11 pkgver=22
12 pkgrel=1
13 pkgdesc="A General Framework for Graph Optimization"
14 arch=('i686' 'x86_64')
15 url="http://openslam.org/g2o.html"
16 license=('LGPLv3')
17 groups=()
18 depends=('suitesparse' 'qt')
19 makedepends=('subversion' 'cmake')
20 provides=()
21 conflicts=()
22 replaces=()
23 backup=()
24 options=()
25 install=
26 source=()
27 noextract=()
28 md5sums=() #generate with 'makepkg -g'
30 _svntrunk=https://svn.openslam.org/data/svn/g2o/trunk
31 _svnmod=g2o
33 build() {
34   cd "$srcdir"
35   msg "Connecting to SVN server...."
37   if [[ -d "$_svnmod/.svn" ]]; then
38     (cd "$_svnmod" && svn up -r "$pkgver")
39   else
40     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
41   fi
43   msg "SVN checkout done or server timeout"
44   msg "Starting build..."
46   rm -rf "$srcdir/$_svnmod-build"
47   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
48   cd "$srcdir/$_svnmod-build"
50   #
51   # BUILD HERE
52   #
53   mkdir -p build;cd build
54   cmake ..
55   make
58 package() {
59   cd "$srcdir/$_svnmod-build"
60   mkdir -p $pkgdir/usr/lib 
61   mkdir -p $pkgdir/usr/bin
62   install -m644 lib/* $pkgdir/usr/lib  
63   install -m644 bin/* $pkgdir/usr/bin