summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c99d0a36035b0691e1be190b436f7634c590e6bd (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Schrottfresse <schrottfresse@gmx.de>

pkgname=libspatialindex-git
_pkg="${pkgname%-git}"
pkgver=1.9.3.r30.g3be6758
pkgrel=1
pkgdesc="C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API"
arch=('x86_64')
url='https://github.com/libspatialindex/libspatialindex'
license=('MIT')
depends=('gcc-libs')
makedepends=('cmake' 'git' 'python')
provides=("$_pkg" "$_pkg.so" "${_pkg}_c.so")
conflicts=("$_pkg")
source=("$_pkg::git+$url")
sha256sums=('SKIP')

pkgver() {
	git -C "$_pkg" describe --long --tags | sed 's/-/.r/;s/-/./'
}

build() {
	cmake \
		-B build \
		-S "$_pkg" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_TESTING=ON \
		-Wno-dev
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dvm644 "$_pkg/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}