summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2bf11208cef253ef99b086efcf7314770486867c (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
38
39
40
41
42
43
44
45
46
47
# Maintainer: Bruno Fernandes <brunofernandes at ua pt>

pkgname=osgearth-git
_gitname=osgearth
pkgver=r6.5b5e35b
pkgrel=1
pkgdesc="A terrain rendering toolkit for OpenSceneGraph"
arch=('i686' 'x86_64')
url='http://www.osgearth.org'
license=('LGPL')
depends=('openscenegraph' 'gdal' 'expat' 'curl' )
optdepends=('geos: Improved vector support'
            'sqlite: Flat file cache'
            'libzip: Archive support')
makedepends=('git' 'cmake')
source=("$_gitname::git+https://github.com/gwaldron/osgearth")
provides=('osgearth')
conflicts=('osgearth-qt4' 'osgearth')
md5sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgname}"
	( set -o pipefail
	  git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
	  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

build() {
    cd "$srcdir/$_gitname"
    rm -rf build
    mkdir -p build
    cd build
    cmake .. \
  			-DLIB_POSTFIX= \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release
    make
}

package() {
   cd "$srcdir/$_gitname"/build
   make DESTDIR="$pkgdir" install
   mkdir -p "$pkgdir"/usr/share/osgearth
   cp -r "$srcdir"/$_gitname/tests "$pkgdir"/usr/share/osgearth
   cp -r "$srcdir"/$_gitname/data "$pkgdir"/usr/share/osgearth
}