aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gdal/APKBUILD
blob: ca72d1dfc675cfbfe6b8d2a14a88c679ac9fa537 (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
# Contributor: Trevor R.H. Clarke <trevor@notcows.com>
# Maintainer: Trevor R.H. Clarke <trevor@notcows.com>
pkgname=gdal
pkgver=2.1.3
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="giflib-dev jpeg-dev libjpeg-turbo-dev libpng-dev tiff-dev zlib-dev swig python2-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 || return 1
	make || return 1

	cd swig/python
	python2 setup.py build
}

package() {
	cd "$builddir"

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

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

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

	chmod a+x scripts/*
	install -d "$subpkgdir"/usr/bin
	install -m755 scripts/*.py "$subpkgdir"/usr/bin/
}
md5sums="66f36c08b7ec6d31bda99083f179d183  gdal-2.1.3.tar.xz"
sha256sums="b489793627e6cb8d2ff8d7737b61daf58382fe189fae4c581ddfd48c04b49005  gdal-2.1.3.tar.xz"
sha512sums="3903f7480f0fbfd3022e11b0d2a13702a45a074b225d9b78202202dc427e850ee1238c0d970e6b25ae2b79acaf0f76fc04435767b5c88a609c96b03095b92678  gdal-2.1.3.tar.xz"