summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDoug Newgard2019-08-30 08:47:57 -0500
committerDoug Newgard2019-08-30 08:47:57 -0500
commit08017b29cafb7e12dc77151916f0a641e510b2c3 (patch)
tree431d35f00d6fd23186851da9fe2bc64e5659d21c /PKGBUILD
downloadaur-08017b29cafb7e12dc77151916f0a641e510b2c3.tar.gz
Python2 GDAL bindings
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3844c3c9213b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Doug Newgard <scimmia at archlinux dot org>
+
+pkgname=python2-gdal
+pkgver=3.0.1
+pkgrel=1
+pkgdesc='Python2 bindings for GDAL'
+arch=('x86_64')
+url='https://gdal.org/'
+license=('custom')
+depends=('gcc-libs' 'gdal' 'glibc' 'python2' 'python2-numpy')
+source=("https://download.osgeo.org/gdal/$pkgver/gdal-$pkgver.tar.xz")
+sha256sums=('45b4ae25dbd87282d589eca76481c426f72132d7a599556470d5c38263b09266')
+
+build() {
+ cd gdal-$pkgver/swig/python
+ python2 setup.py build
+}
+
+package() {
+ cd gdal-$pkgver/swig/python
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ cd "$pkgdir/usr/bin/"
+ for bin in *.py; do mv $bin ${bin%.py}2.py; done
+
+ install -dm755 "$pkgdir/usr/share/licenses"
+ ln -s gdal "$pkgdir/usr/share/licenses/$pkgname"
+}