aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gdal/APKBUILD
blob: a17094b2c7f6840121de45b8dc09d145b5f34ab1 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Contributor: Trevor R.H. Clarke <trevor@notcows.com>
# Maintainer: Trevor R.H. Clarke <trevor@notcows.com>
pkgname=gdal
pkgver=2.3.2
pkgrel=1
pkgdesc="A translator library for raster and vector geospatial data formats"
url="http://gdal.org"
arch="all"
license="MIT"
depends=""
depends_dev="gdal"
makedepends="
	curl-dev
	giflib-dev
	jpeg-dev
	libjpeg-turbo-dev
	libpng-dev
	linux-headers
	postgresql-dev
	python2-dev
	sqlite-dev
	swig
	tiff-dev
	zlib-dev
	"
subpackages="
	$pkgname-dev
	py-$pkgname:py
	"

source="http://download.osgeo.org/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure --prefix=/usr \
		--with-curl=/usr/bin/curl-config
	make

	cd swig/python
	python2 setup.py build
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install
	chmod -x "$pkgdir"/usr/include/*.h
}

py() {
	pkgdesc="$pkgname (python bindings)"

	cd "$builddir"/swig/python
	python2 setup.py install --prefix=/usr --root="$subpkgdir"

	chmod a+x scripts/*
	install -d "$subpkgdir"/usr/bin
	install -m755 scripts/*.py "$subpkgdir"/usr/bin/
}

check() {
	# TODO: https://trac.osgeo.org/gdal/wiki/TestingNotes

	cd "$builddir"
	apps/gdal-config --version | grep "$pkgver"

	# confirms MBTiles support
	apps/gdal_translate --formats | grep "MBTiles -raster,vector- (rw+v): MBTiles"

	# confirms PostgreSQL/PostGIS support
	apps/ogr2ogr --formats | grep "PostgreSQL -vector- (rw+): PostgreSQL/PostGIS"
}
sha512sums="5e8a121d19cc3145788726fd60c818b42eadf8656f29ca325c6acd6a632cbdd331981dbd0a8b5173c749d1757ece296fb9ac5898570f73fafa672dd04e70a369  gdal-2.3.2.tar.xz"