diff options
Diffstat (limited to 'community')
-rw-r--r-- | community/gdal/APKBUILD | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/community/gdal/APKBUILD b/community/gdal/APKBUILD new file mode 100644 index 0000000000..950230fa3e --- /dev/null +++ b/community/gdal/APKBUILD @@ -0,0 +1,73 @@ +# Contributor: Trevor R.H. Clarke <trevor@notcows.com> +# Maintainer: Trevor R.H. Clarke <trevor@notcows.com> +pkgname=gdal +pkgver=2.4.2 +pkgrel=1 +pkgdesc="A translator library for raster and vector geospatial data formats" +url="https://gdal.org" +arch="all !s390x" +license="MIT" +depends_dev="gdal" +makedepends=" + curl-dev + geos-dev + giflib-dev + jpeg-dev + libjpeg-turbo-dev + libpng-dev + linux-headers + postgresql-dev + python3-dev + sqlite-dev + swig + tiff-dev + zlib-dev + expat-dev + " +subpackages=" + $pkgname-dev + py3-$pkgname:py3 + " + +source="http://download.osgeo.org/gdal/$pkgver/gdal-$pkgver.tar.xz" + +build() { + ./configure --prefix=/usr \ + --with-curl=/usr/bin/curl-config + make + + cd swig/python + python3 setup.py build +} + +package() { + make DESTDIR="$pkgdir" install + chmod -x "$pkgdir"/usr/include/*.h +} + +py3() { + pkgdesc="$pkgname (python3 bindings)" + + replaces="py-$pkgname" # Backwards compatibility + provides="py-$pkgname=$pkgver-r$pkgrel" # Backwards compatibility + + cd "$builddir"/swig/python + python3 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 + + 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="70abcbd7aa5878ff51efb830cef53cb0ee9a4ce88d11b34563da3af9143dd0d46e4e1461164aa9277bb0f578a3b2bc9bfd7650905f0f184f2c4f146df72f6b4e gdal-2.4.2.tar.xz" |