Spotter-VM/apk/gdal/APKBUILD

77 lines
1.6 KiB
Plaintext

# Contributor: Trevor R.H. Clarke <trevor@notcows.com>
# Maintainer: Trevor R.H. Clarke <trevor@notcows.com>
pkgname=gdal
pkgver=2.4.0
pkgrel=1
pkgdesc="A translator library for raster and vector geospatial data formats"
url="http://gdal.org"
arch="x86 x86_64"
license="MIT"
depends=""
depends_dev="gdal"
makedepends="
curl-dev
geos-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="d4eb6535043b1495f691ab96aa8087d9254aa01efbc57a4051f8b9f4f6b2537719d7bf03ff82c3f6cfd0499a973c491fa9da9f5854dbd9863a0ec9796d3642bb gdal-2.4.0.tar.xz"