Build custom GDAL, GEOS, PROJ.4, PostGIS
This commit is contained in:
parent
1989b886f5
commit
cd4591501f
@ -14,6 +14,24 @@ tar cpf /srv/build/_vm.tar *
|
|||||||
# Build native apps
|
# Build native apps
|
||||||
cd ${ROOT}/apk/acme-sh
|
cd ${ROOT}/apk/acme-sh
|
||||||
abuild -F
|
abuild -F
|
||||||
|
|
||||||
|
cd ${ROOT}/apk/geos
|
||||||
|
apk add swig python2-dev
|
||||||
|
abuild -F
|
||||||
|
|
||||||
|
cd ${ROOT}/apk/gdal
|
||||||
|
apk add curl-dev giflib-dev jpeg-dev libjpeg-turbo-dev libpng-dev linux-headers postgresql-dev python2-dev sqlite-dev swig tiff-dev zlib-dev
|
||||||
|
apk add --repository /srv/build/apk geos-dev
|
||||||
|
abuild -F
|
||||||
|
|
||||||
|
cd ${ROOT}/apk/proj4
|
||||||
|
abuild -F
|
||||||
|
|
||||||
|
cd ${ROOT}/apk/postgis
|
||||||
|
apk add postgresql-dev libxml2-dev perl-dev json-c-dev pcre-dev postgresql perl
|
||||||
|
apk add --repository /srv/build/apk geos-dev gdal-dev proj4-dev
|
||||||
|
abuild -F
|
||||||
|
|
||||||
cd ${ROOT}/apk/vmmgr
|
cd ${ROOT}/apk/vmmgr
|
||||||
abuild -F
|
abuild -F
|
||||||
|
|
||||||
|
76
apk/gdal/APKBUILD
Normal file
76
apk/gdal/APKBUILD
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# 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"
|
55
apk/geos/APKBUILD
Normal file
55
apk/geos/APKBUILD
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# Contributor: Eric Kidd <git@randomhacks.net>
|
||||||
|
# Maintainer:
|
||||||
|
pkgname=geos
|
||||||
|
pkgver=3.7.1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="GEOS is a library providing OpenGIS and JTS spatial operations in C++."
|
||||||
|
url="https://trac.osgeo.org/geos/"
|
||||||
|
# test fails on other archs
|
||||||
|
arch="x86 x86_64"
|
||||||
|
license="LGPL-2.1"
|
||||||
|
makedepends="swig python2-dev"
|
||||||
|
subpackages="py-$pkgname:py $pkgname-dev"
|
||||||
|
source="http://download.osgeo.org/geos/geos-$pkgver.tar.bz2"
|
||||||
|
builddir="$srcdir/$pkgname-$pkgver"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$builddir"
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--build=$CBUILD \
|
||||||
|
--host=$CHOST \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--enable-python
|
||||||
|
|
||||||
|
# --enable-ruby produces a gem which crashes, and which seems to
|
||||||
|
# mostly ignored in favor of the rgeo and ffi-geos modules, anyway.
|
||||||
|
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$builddir"
|
||||||
|
|
||||||
|
make check
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$builddir"
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" install
|
||||||
|
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
||||||
|
}
|
||||||
|
|
||||||
|
py() {
|
||||||
|
pkgdesc="$pkgname Python bindings"
|
||||||
|
|
||||||
|
cd "$builddir"
|
||||||
|
install -d "$subpkgdir"/usr/lib
|
||||||
|
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="01e8087bcd3cb8f873adb7b56910e1575ccb3336badfdd3f13bc6792095b7010e5ab109ea0d0cd3d1459e2e526e83bcf64d6ee3f7eb47be75639becdaacd2a87 geos-3.7.1.tar.bz2"
|
38
apk/postgis/APKBUILD
Normal file
38
apk/postgis/APKBUILD
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Contributor: Bjoern Schilberg <bjoern@intevation.de>
|
||||||
|
# Maintainer: Bjoern Schilberg <bjoern@intevation.de>
|
||||||
|
pkgname=postgis
|
||||||
|
pkgver=2.5.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="PostGIS is a spatial database extender for PostgreSQL object-relational database."
|
||||||
|
url="https://postgis.net/"
|
||||||
|
# geos test fails on other archs
|
||||||
|
arch="x86 x86_64" # fails on x86*
|
||||||
|
license="GPL-2.0-or-later"
|
||||||
|
depends="postgresql perl"
|
||||||
|
makedepends="postgresql-dev geos-dev gdal-dev libxml2-dev proj4-dev perl-dev
|
||||||
|
json-c-dev pcre-dev"
|
||||||
|
subpackages="$pkgname-dev $pkgname-doc"
|
||||||
|
source="http://download.osgeo.org/postgis/source/$pkgname-$pkgver.tar.gz"
|
||||||
|
options="!check" # tests depends on a running PostgreSQL server
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$builddir"
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--build=$CBUILD \
|
||||||
|
--host=$CHOST \
|
||||||
|
--prefix=/usr \
|
||||||
|
--disable-gtktest \
|
||||||
|
--disable-nls \
|
||||||
|
--disable-rpath \
|
||||||
|
--without-protobuf
|
||||||
|
make -j1
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$builddir"
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" install
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="c6c9c8c5befd945614e92d1062df1d753ca8b7fd69b70226065c2dac77a59783b14ece4da994187079b683ee090ba5a79389ba679f22fce8c20a5afc2c8dfca0 postgis-2.5.1.tar.gz"
|
33
apk/proj4/APKBUILD
Normal file
33
apk/proj4/APKBUILD
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
|
pkgname=proj4
|
||||||
|
pkgver=5.2.0
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="PROJ.4 - Cartographic Projections Library"
|
||||||
|
url="https://trac.osgeo.org/proj/"
|
||||||
|
arch="all"
|
||||||
|
license="MIT"
|
||||||
|
options=""
|
||||||
|
depends=""
|
||||||
|
makedepends=""
|
||||||
|
subpackages="$pkgname-doc $pkgname-dev"
|
||||||
|
source="http://download.osgeo.org/proj/proj-$pkgver.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
builddir="$srcdir"/proj-$pkgver
|
||||||
|
build () {
|
||||||
|
cd "$builddir"
|
||||||
|
./configure \
|
||||||
|
--build=$CBUILD \
|
||||||
|
--host=$CHOST \
|
||||||
|
--prefix=/usr \
|
||||||
|
--without-jni \
|
||||||
|
|| return 1
|
||||||
|
make || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$builddir"
|
||||||
|
mkdir -p $pkgdir/usr/bin
|
||||||
|
make DESTDIR="$pkgdir" install
|
||||||
|
}
|
||||||
|
sha512sums="f773117d22309d4ee8dbedc2a7b6ba27e8cd032e1bd0af3c98f270bf7b7ab3353be0b04d91202a1f137fc45164c8e8a52712bb06281948008160d08f9f9074ba proj-5.2.0.tar.gz"
|
Loading…
Reference in New Issue
Block a user