summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8794d93839a35dc4a3164e9085e9b6c20e9d9e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Kartik Mohta <kartikmohta@gmail.com>
pkgname=g2o-git
pkgver=r798.2e35669
pkgrel=1
pkgdesc="A General Framework for Graph Optimization"
arch=('i686' 'x86_64')
url="https://github.com/RainerKuemmerle/g2o"
license=('BSD')
groups=()
depends=('suitesparse' 'qt5-base' 'eigen3' 'glu')
optdepends=('libqglviewer: for building the g2o_viewer app')
makedepends=('git' 'cmake')
provides=('g2o')
conflicts=('g2o-svn')
options=()
source=($pkgname::git+https://github.com/RainerKuemmerle/g2o.git)
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"

  mkdir -p build
  cd build
  cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DG2O_BUILD_APPS=ON \
    -DG2O_BUILD_EXAMPLES=OFF
  make
}

package() {
  cd "$srcdir/$pkgname/build"
  make DESTDIR="$pkgdir" install
}