[SCM] postgis branch, master, updated. upstream/2.0.1-38-g05bea3a
Markus Wanner
markus at bluegap.ch
Thu Apr 25 19:16:14 UTC 2013
The following commit has been merged in the master branch:
commit fff0900778c11a0bba822e01521b61d916cdecbf
Author: Markus Wanner <markus at bluegap.ch>
Date: Thu Apr 25 21:57:51 2013 +0200
Drop the postinst and postrm scripts in favor of simply providing
the necessary symlinks from the postgresql-9.1-postgis package,
directly. Requires some love from debian/rules, in the form of
moving and symlinking files properly after installation.
diff --git a/debian/changelog b/debian/changelog
index 3a128be..bb79375 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,8 +17,8 @@ postgis (2.0.3-1) UNRELEASED; urgency=low
required Build-Depends-Indeps.
* Separate large SQL scripts and perl utils. Put them in their own
architecture independent and (hopefully) PostgreSQL version
- indepentend package: postgis-data2.0.3. Let postinst add symlinks as
- appropriate.
+ indepentend package: postgis-scripts2.0.3. Provide symlinks from the
+ extension package.
* Separate PostGIS documentation into a postgis-doc package, register its
contents with doc-base.
* Represent the fact that lwgeom isn't backward compatible in its SONAME,
diff --git a/debian/postgis-postgresql-generic.postinst.in b/debian/postgis-postgresql-generic.postinst.in
deleted file mode 100644
index 5707353..0000000
--- a/debian/postgis-postgresql-generic.postinst.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "configure" ]; then
-# Creates a link for the shared lib in the postgres area
-# if [ -f /usr/lib/postgis/@POSTGIS_VERSION@/postgres/@POSTGRES_VERSION@/lib/postgis- at SOVERSION@.so ]; then
-# ln -f /usr/lib/postgis/@POSTGIS_VERSION@/postgres/@POSTGRES_VERSION@/lib/postgis- at SOVERSION@.so \
-# /usr/lib/postgresql/@POSTGRES_VERSION@/lib/postgis- at SOVERSION@.so
-# else
-# echo "Postgis extension not found, something wrong did probably happen"
-# fi
-
- for FILE in /usr/share/postgis/@POSTGIS_VERSION@/sql/*.sql; do
- ln -f $FILE /usr/share/postgresql/@POSTGRES_VERSION@/extension/
- done
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/postgis-scripts2.0.3.install b/debian/postgis-scripts2.0.3.install
index 9790b32..c7cc660 100644
--- a/debian/postgis-scripts2.0.3.install
+++ b/debian/postgis-scripts2.0.3.install
@@ -1,3 +1,2 @@
-extensions/postgis/sql/*.sql /usr/share/postgis/2.0.3/sql/
-extensions/postgis_topology/sql/*.sql /usr/share/postgis/2.0.3/sql/
+usr/share/postgis/2.0.3
utils/*.pl /usr/share/postgis/2.0.3/utils/
diff --git a/debian/postgresql-9.1-postgis.install b/debian/postgresql-9.1-postgis.install
index 65f0763..abf68bb 100644
--- a/debian/postgresql-9.1-postgis.install
+++ b/debian/postgresql-9.1-postgis.install
@@ -1,2 +1,2 @@
-usr/share/postgresql/9.1/extension/*.control
+usr/share/postgresql/9.1/extension
usr/lib/postgresql/9.1/lib
diff --git a/debian/postgresql-postgis-generic.postrm.in b/debian/postgresql-postgis-generic.postrm.in
deleted file mode 100644
index 1c3cdbb..0000000
--- a/debian/postgresql-postgis-generic.postrm.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Removes all postgis shared libs links
-if [ "$1" = "purge" ]; then
- for version in @POSTGRES_VERSIONS@
- do
- find /usr/lib/postgresql/$version/lib -type f -name "postgis- at SOVERSION@.so" -delete || true
- done
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/rules b/debian/rules
index bf556f9..10dee3d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -54,6 +54,16 @@ build-indep-stamp: configuration-stamp
# Let PostGIS create a perl script from postgis_restore.pl.in
$(MAKE) -C utils
+# Create a few SQL scripts that the Makefiles are not clever enough
+# to resolve, when building arch-indep only.
+ $(MAKE) -C postgis postgis.sql postgis_upgrade_20_minor.sql
+ $(MAKE) -C raster/rt_pg rtpostgis.sql rtpostgis_upgrade_20_minor.sql
+ $(MAKE) -C topology topology.sql topology_upgrade_20_minor.sql
+
+# This create the required SQL scripts. Again, the Makefile is not
+# clever enough to run this before 'install'.
+ $(MAKE) -C extensions
+
touch $@
configuration: configuration-stamp
@@ -99,10 +109,18 @@ install-indep: build-indep
dh_prep -i
dh_installdirs -i
+ $(MAKE) -C extensions install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) -C doc docs-install \
DESTDIR=$(CURDIR)/debian/tmp \
- PGSQL_DOCDIR=/usr/share/doc \
- PGSQL_SHAREDIR=/usr/share/postgresql/9.1
+ PGSQL_DOCDIR=/usr/share/doc
+
+# Move all SQL files to /usr/share/postgis - the original location's
+# files will get replaced with symlinks.
+ mkdir -p $(CURDIR)/debian/tmp/usr/share/postgis/$(VERSION)/sql
+ set -e; \
+ for FILE in $(CURDIR)/debian/tmp/usr/share/postgresql/9.1/extension/*.sql; do \
+ mv $$FILE $(CURDIR)/debian/tmp/usr/share/postgis/$(VERSION)/sql/; \
+ done
dh_install -i
@@ -116,13 +134,15 @@ install-arch: build-arch
$(MAKE) -C doc man-install \
DESTDIR=$(CURDIR)/debian/tmp \
PGSQL_DOCDIR=/usr/share/doc \
- PGSQL_MANDIR=/usr/share/man \
- PGSQL_SHAREDIR=/usr/share/postgresql/9.1
-
-# Create custom maint scripts: 9.1
- sed -e 's/@POSTGRES_VERSIONS@/9.1/' \
- -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \
- $(CURDIR)/debian/postgresql-postgis-generic.postrm.in >$(CURDIR)/debian/postgresql-9.1-postgis.postrm
+ PGSQL_MANDIR=/usr/share/man
+
+# Link from the default postgresql extension directory back to the
+# share postgis one, where postgis-scripts provides SQL scripts.
+ set -e; \
+ for FILE in $(CURDIR)/debian/tmp/usr/share/postgresql/9.1/extension/*.sql; do \
+ BASENAME=$$(basename $$FILE); \
+ ln -sf /usr/share/postgis/$(VERSION)/sql/$$BASENAME $$FILE; \
+ done
dh_install -s
--
PostGIS for PostgreSQL
More information about the Pkg-grass-devel
mailing list