From 001f5e56622962b8486867f3e1736bfdbde6e471 Mon Sep 17 00:00:00 2001 From: Benjamin Trigona-Harany Date: Thu, 11 Dec 2014 22:03:33 -0800 Subject: gis/postgis: Add option for pgAdmin plugin. Signed-off-by: Benjamin Trigona-Harany --- gis/postgis/README | 2 ++ gis/postgis/postgis.SlackBuild | 10 +++++++++- gis/postgis/postgis.ini | 11 +++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gis/postgis/postgis.ini diff --git a/gis/postgis/README b/gis/postgis/README index 5cd5f3b0bc9c9..cfb68cd12c35e 100644 --- a/gis/postgis/README +++ b/gis/postgis/README @@ -11,3 +11,5 @@ extension, but they can be make available by loading To disable the GTK-based graphical interface for shp2pgsql, set GUI=no. + +To include the shp2pgsql plugin for pgAdmin set PGADMIN=yes. diff --git a/gis/postgis/postgis.SlackBuild b/gis/postgis/postgis.SlackBuild index 2f4101fb28ef6..37df65f73899c 100644 --- a/gis/postgis/postgis.SlackBuild +++ b/gis/postgis/postgis.SlackBuild @@ -26,7 +26,7 @@ PRGNAM=postgis VERSION=${VERSION:-2.1.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -42,9 +42,12 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} GUI=${GUI:-yes} +PGADMIN=${PGADMIN:-no} if [ "$GUI" = "yes" ] ; then SHP2PGSQL_GUI="--with-gui" +else + PGADMIN=no fi if [ "$ARCH" = "i486" ]; then @@ -94,6 +97,11 @@ make install DESTDIR=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +if [ "$PGADMIN" = "yes" ] ; then + mkdir -p $PKG/usr/share/pgadmin3/plugins.d + cp $CWD/$PRGNAM.ini $PKG/usr/share/pgadmin3/plugins.d +fi + mkdir -p $PKG/usr/man/man1 cp -a doc/man/* $PKG/usr/man/man1 gzip -9 $PKG/usr/man/man1/*.1 diff --git a/gis/postgis/postgis.ini b/gis/postgis/postgis.ini new file mode 100644 index 0000000000000..9599069df3bf4 --- /dev/null +++ b/gis/postgis/postgis.ini @@ -0,0 +1,11 @@ +; +; pgShapeLoader (Linux): +; +Title=PostGIS Shapefile and DBF loader +Command=$$PGBINDIR/shp2pgsql-gui -U $$USERNAME -d $$DATABASE -p $$PORT -h $$HOSTNAME +Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database. +KeyFile=$$PGBINDIR/shp2pgsql-gui +Platform=unix +ServerType=postgresql +Database=Yes +SetPassword=No -- cgit v1.2.3