From 1a462b5a52c1de411981a3280c71c9f22b70cb4b Mon Sep 17 00:00:00 2001 From: Evan H Stanton <79367212+EvanHStanton@users.noreply.github.com> Date: Thu, 13 Jul 2023 22:51:36 +0200 Subject: [PATCH] add postgis (#216) --- contrib/postgis/Dockerfile | 29 +++++++++++++++++++++++++++++ contrib/postgis/Trunk.toml | 21 +++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 contrib/postgis/Dockerfile create mode 100644 contrib/postgis/Trunk.toml diff --git a/contrib/postgis/Dockerfile b/contrib/postgis/Dockerfile new file mode 100644 index 00000000..4e26e95a --- /dev/null +++ b/contrib/postgis/Dockerfile @@ -0,0 +1,29 @@ +ARG PG_VERSION=15 +FROM quay.io/coredb/c-builder:pg${PG_VERSION} +USER root + +RUN apt-get update && apt-get install -y \ + build-essential \ + libreadline-dev \ + zlib1g-dev \ + flex \ + bison \ + libxml2-dev \ + libxslt-dev \ + libssl-dev \ + libxml2-utils \ + xsltproc \ + ccache \ + libgdal-dev \ + libgeos-dev \ + osm2pgsql \ + libprotobuf-c-dev \ + protobuf-c-compiler + +RUN wget https://download.osgeo.org/postgis/source/postgis-3.3.3.tar.gz && \ + tar xvf postgis-3.3.3.tar.gz && \ + cd postgis-3.3.3 && \ + ./configure && \ + make && \ + cd extensions/postgis && \ + make diff --git a/contrib/postgis/Trunk.toml b/contrib/postgis/Trunk.toml new file mode 100644 index 00000000..9acbb912 --- /dev/null +++ b/contrib/postgis/Trunk.toml @@ -0,0 +1,21 @@ +[extension] +name = "postgis" +version = "3.3.3" +repository = "https://github.com/postgis/postgis" +license = "GPL-2.0" +description = "PostGIS geometry and geography spatial types and functions." +homepage = "http://postgis.net/" +documentation = "http://postgis.net/" +categories = ["data_transformations"] + +[build] +postgres_version = "15" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = """ + cd postgis-3.3.3/extensions/postgis && make install + set -x + mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension + mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib + """ +