[SCM] postgis branch, master, updated. upstream/2.0.1-28-g2ec27fa

Markus Wanner markus at bluegap.ch
Thu Apr 18 12:07:45 UTC 2013


The following commit has been merged in the master branch:
commit 398a2253da402d47d9871e6fa97a945a5d3ef08b
Author: Markus Wanner <markus at bluegap.ch>
Date:   Thu Apr 11 23:23:35 2013 +0200

    Merge in work from Stephen Frost, most notably the separation of
    liblwgeom from postgis.

diff --git a/debian/changelog b/debian/changelog
index 936e93b..24c42b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,14 @@ postgis (2.0.3-1) UNRELEASED; urgency=low
     debian/rules cleanup some more generated files.
   * rules: swap dh_makeshlibs and dh_installdeb.
   * Update and improve watchfile.
+  
+  [Stephen Frost]
+  * Split out liblwgeom2 and liblwgeom-dev from postgis.
+  * Add patches debian-versions and link-liblwgeom.
+  * Let postgis install under /usr/lib/postgresql rather than under
+    /usr/lib/postgis plus symlink in the former directory.
+  * debian/rules: improve cleanup target.
+  * Simplify and tweak build rules.
 
   [Jerome Villeneuve Larouche]
   * Removed old patches (generator, html_doc_resources, install)
diff --git a/debian/control b/debian/control
index 0128a44..864f08a 100644
--- a/debian/control
+++ b/debian/control
@@ -57,3 +57,32 @@ Description: Geographic objects support for PostgreSQL -- JDBC support
  .
  This package contains JDBC support for PostGIS.
 
+Package: liblwgeom2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: PostGIS "Lightweight Geometry" library
+ PostGIS adds support for geographic objects to the PostgreSQL object-relational
+ database. In effect, PostGIS "spatially enables" the PostgreSQL server, 
+ allowing it to be used as a backend spatial database for geographic information
+ systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS
+ follows the OpenGIS "Simple Features Specification for SQL".
+ .
+ This library is the generic geometry handling section of PostGIS. The geometry
+ objects, constructors, destructors, and a set of spatial processing functions,
+ are implemented here.
+
+Package: liblwgeom-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblwgeom2 (= ${binary:Version})
+Description: PostGIS "Lightweight Geometry" library - Development files
+ PostGIS adds support for geographic objects to the PostgreSQL object-relational
+ database. In effect, PostGIS "spatially enables" the PostgreSQL server, 
+ allowing it to be used as a backend spatial database for geographic information
+ systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS
+ follows the OpenGIS "Simple Features Specification for SQL".
+ .
+ This library is the generic geometry handling section of PostGIS. The geometry
+ objects, constructors, destructors, and a set of spatial processing functions,
+ are implemented here.  This package contains the development files.
diff --git a/debian/liblwgeom-dev.install b/debian/liblwgeom-dev.install
new file mode 100644
index 0000000..01df5de
--- /dev/null
+++ b/debian/liblwgeom-dev.install
@@ -0,0 +1,3 @@
+usr/include
+usr/lib/liblwgeom.a
+usr/lib/liblwgeom.so
diff --git a/debian/liblwgeom2.install b/debian/liblwgeom2.install
new file mode 100644
index 0000000..fd61f8a
--- /dev/null
+++ b/debian/liblwgeom2.install
@@ -0,0 +1 @@
+usr/lib/liblwgeom-2.0.3.so
diff --git a/debian/patches/debian-versions b/debian/patches/debian-versions
new file mode 100644
index 0000000..60619a4
--- /dev/null
+++ b/debian/patches/debian-versions
@@ -0,0 +1,32 @@
+Description: Update various files to Debian versions
+ There are a number of #defines and similar which change based on the
+ specific versions of software being compiled against.  Update these to
+ match the current Debian build environment.
+Author: Stephen Frost <sfrost at snowman.net>
+Last-Update: 2012-10-12
+
+--- a/postgis/sqldefines.h
++++ b/postgis/sqldefines.h
+@@ -8,9 +8,9 @@
+  */
+ #define POSTGIS_PGSQL_VERSION 91
+ #define POSTGIS_GEOS_VERSION 33
+-#define POSTGIS_PROJ_VERSION 48
++#define POSTGIS_PROJ_VERSION 47
+ #define POSTGIS_LIB_VERSION 2.0.3
+-#define POSTGIS_LIBXML2_VERSION 2.7.8
++#define POSTGIS_LIBXML2_VERSION 2.8.0
+ 
+ /*
+  * Define the build date and the version number
+--- a/doc/Makefile.comments
++++ b/doc/Makefile.comments
+@@ -21,7 +21,7 @@
+ DATA_built=postgis_comments.sql raster_comments.sql topology_comments.sql
+ 
+ # PGXS information
+-PG_CONFIG = /usr/bin/pg_config 
++PG_CONFIG = /usr/lib/postgresql/9.1/bin/pg_config
+ PGXS := /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk
+ include $(PGXS)
+ 
diff --git a/debian/patches/link-liblwgeom b/debian/patches/link-liblwgeom
new file mode 100644
index 0000000..073480d
--- /dev/null
+++ b/debian/patches/link-liblwgeom
@@ -0,0 +1,28 @@
+Description: Dynamically link to liblwgeom
+ Instead of statically pulling liblwgeom into the postgis.so, dynamically
+ link to it.
+Author: Stephen Frost <sfrost at snowman.net>
+Last-Update: 2012-10-13
+
+--- a/postgis/Makefile.in
++++ b/postgis/Makefile.in
+@@ -72,7 +72,7 @@
+ # older version of PostGIS, rather than with the static liblwgeom.a 
+ # supplied with newer versions of PostGIS
+ PG_CPPFLAGS += @CPPFLAGS@ -I../liblwgeom -I../libpgcommon
+-SHLIB_LINK_F = ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a @SHLIB_LINK@ 
++SHLIB_LINK_F = -L../liblwgeom/.libs -llwgeom ../libpgcommon/libpgcommon.a @SHLIB_LINK@ 
+ 
+ # Extra files to remove during 'make clean'
+ EXTRA_CLEAN=$(SQL_OBJS) legacy_uninstall.sql
+--- a/raster/rt_pg/Makefile.in
++++ b/raster/rt_pg/Makefile.in
+@@ -34,7 +34,7 @@
+ # older version of PostGIS, rather than with the static liblwgeom.a 
+ # supplied with newer versions of PostGIS
+ #
+-LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a
++LIBLWGEOM_LDFLAGS=-L../../liblwgeom/.libs -llwgeom
+ LIBLWGEOM_CFLAGS="-I../../liblwgeom"
+ LIBPGCOMMON_CFLAGS="-I../../libpgcommon"
+ LIBPGCOMMON_LDFLAGS=../../libpgcommon/libpgcommon.a
diff --git a/debian/patches/series b/debian/patches/series
index f4800ef..48a2662 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 fixmakedoc
 fix-spelling.diff
+debian-versions
+link-liblwgeom
diff --git a/debian/postgis-postgresql-generic.postinst.in b/debian/postgis-postgresql-generic.postinst.in
index 6d4e5c0..a68220f 100644
--- a/debian/postgis-postgresql-generic.postinst.in
+++ b/debian/postgis-postgresql-generic.postinst.in
@@ -3,14 +3,14 @@
 set -e
 
 # Creates a link for the shared lib in the postgres area
-if [ "$1" = "configure" ]; then
-	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
-fi
+#if [ "$1" = "configure" ]; then
+#	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
+#fi
 
 #DEBHELPER#
 
diff --git a/debian/postgis.install b/debian/postgis.install
new file mode 100644
index 0000000..1db2639
--- /dev/null
+++ b/debian/postgis.install
@@ -0,0 +1,4 @@
+usr/share/doc/postgis/postgis/postgis.html usr/share/doc/postgis/
+usr/share/doc/postgis/postgis/README.postgis usr/share/doc/postgis/
+usr/share/man
+usr/lib/postgresql/9.1/bin usr
diff --git a/debian/postgresql-9.1-postgis.install b/debian/postgresql-9.1-postgis.install
new file mode 100644
index 0000000..abf68bb
--- /dev/null
+++ b/debian/postgresql-9.1-postgis.install
@@ -0,0 +1,2 @@
+usr/share/postgresql/9.1/extension
+usr/lib/postgresql/9.1/lib
diff --git a/debian/rules b/debian/rules
index 0955b5d..5821293 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,6 +49,7 @@ build-indep-stamp:
 clean: 
 	dh_testdir
 	dh_testroot
+	rm -f raster/rt_pg/rtpostgis_drop.sql raster/rt_pg/rtpostgis_upgrade_cleanup.sql postgis/postgis_upgrade_20_minor.sql.in
 	[ -f doc/html/postgis.html.prev ] && mv doc/html/postgis.html.prev doc/html/postgis.html || true
 	[ ! -f GNUmakefile ] || $(MAKE) distclean || true
 	$(MAKE) -C doc images-clean
@@ -68,7 +69,8 @@ install-indep: build-indep
 		--docdir=\$${prefix}/share/doc/postgis \
 		--mandir=\$${prefix}/share/man \
 		--infodir=\$${prefix}/share/info \
-		--with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config \
+		--with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config
+
 	# regress target uses pushd/popd
 	$(MAKE) SHELL=/bin/bash distclean
 	dh_install -i
@@ -79,15 +81,14 @@ install-arch: build-arch
 	dh_prep -s 
 	dh_installdirs -s
 	# Documentation and common files for PostGIS
-	[ ! -f doc/html/postgis.html.prev ] && cp doc/html/postgis.html doc/html/postgis.html.prev || true
+	[ ! -f doc/html/postgis.html.prev -a -f doc/html/postgis.html ] && cp doc/html/postgis.html doc/html/postgis.html.prev || true
 	
 	# PostGIS for PostgreSQL 9.1
 	./configure \
 		--host=$(DEB_HOST_GNU_TYPE) \
 		--build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr \
-		--with-docdir=$(CURDIR)/debian/postgis/usr/share/doc \
-		--exec-prefix=\$${prefix}/lib/postgresql/9.1 \
+		--exec-prefix=\$${prefix} \
 		--datadir=\$${prefix}/share/postgresql-9.1-postgis \
 		--mandir=\$${prefix}/share/man \
 		--infodir=\$${prefix}/share/info \
@@ -95,20 +96,14 @@ install-arch: build-arch
 		--with-gui
 	$(MAKE)
 	$(MAKE) -C doc
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/postgresql-9.1-postgis
-	$(MAKE) -C doc man-install \
-			PGSQL_MANDIR=$(CURDIR)/debian/postgis/usr/share/man
-	$(MAKE) -C doc docs-install \
-			PGSQL_DOCDIR=$(CURDIR)/debian/postgis/usr/share/doc/postgis
-	install -m644 doc/postgis_comments.sql \
-		$(CURDIR)/debian/postgresql-9.1-postgis/usr/share/postgresql/9.1/contrib/.
-	install -o root -g root -d $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgis/$(VERSION)/postgres/9.1/lib
-	mv $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgresql/9.1/lib/postgis-$(MAJOR_VERSION).$(MINOR_VERSION).so \
-	   $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgis/$(VERSION)/postgres/9.1/lib/.
-	mv $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgresql/9.1/bin $(CURDIR)/debian/postgis/usr
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	$(MAKE) -C doc docs-install man-install install \
+			DESTDIR=$(CURDIR)/debian/tmp \
+			PGSQL_DOCDIR=/usr/share/doc/postgis \
+			PGSQL_MANDIR=/usr/share/man \
+			PGSQL_SHAREDIR=/usr/share/postgresql/9.1
 	
 	# Create custom maint scripts: 9.1
-	
 	sed -e 's/@POSTGIS_VERSION@/$(VERSION)/' \
 	    -e 's/@POSTGRES_VERSION@/9.1/' \
 	    -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \
@@ -141,7 +136,7 @@ binary-common:
 	dh_strip
 	dh_compress 
 	dh_fixperms
-	dh_makeshlibs
+	dh_makeshlibs -Xusr/lib/postgis
 	dh_installdeb
 	dh_shlibdeps
 	dh_gencontrol
diff --git a/debian/source/options b/debian/source/options
index 6d981f3..af35293 100644
--- a/debian/source/options
+++ b/debian/source/options
@@ -1,2 +1,3 @@
 # Ignore changes on auto-updated files
-extend-diff-ignore = "(^|/)(libtool|postgis/sqldefines.h)$"
+extend-diff-ignore = "(^|/)(doc/html/image_src/Makefile|libtool|postgis/sqldefines.h|doc/html/images/.*\.png)$"
+

-- 
PostGIS for PostgreSQL



More information about the Pkg-grass-devel mailing list