The following commit has been merged in the master branch: commit 2ec27fa4d78c7f4dd838cd8e0dbd49fbd975b647 Author: Markus Wanner <mar...@bluegap.ch> Date: Mon Apr 15 21:30:13 2013 +0200
Split out separate doc and scripts packages from postgis, containing all of the (architecture and PostgreSQL version independent) SQL / Perl scripts for each postgis version and HTML documentation. Let the postinst script of the more specific postgresql-postgis-* package add proper symlinks to the SQL scripts. I consider the perl utils moved, though. Reorganize debian/rules a bit, build in build targets, before installing. Reduce to a single configure run. Represent the fact that lwgeom isn't backward compatible in its SONAME, rename liblwgeom2 to liblwgeom-2.0.3-0 accordingly. Make the java jdbc stuff compile again. Use maven directly, rather than trying to go via make and ant. Add required maven build dependencies.y Downgrade several 'Conflicts' to 'Breaks'. Make liblwgeom2 and liblwgeom-dev break older versions of postgis - files out of postgis into these packages. Add a postgresql- prefix to postgis-generic.postrm.in to match naming with the according ...postinst.in file. Drop an unneeded 'recursive' flag for 'rm'. Tweak package dependencies. Add a spell fix patch. Register documentation with doc-base. Fix java jdbc version identifiers. Policy, copyright and watchfile upgrade. diff --git a/debian/changelog b/debian/changelog index 24c42b6..80a0db3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,17 +1,33 @@ postgis (2.0.3-1) UNRELEASED; urgency=low [Markus Wanner] + * Team upload * New upstream release, 2.0.3 - * Drop Build-Dep on postgresql server binaries - they are not needed. + * Drop Build-Dep on postgresql server binaries. * Downgrade postgresql-9.1-postgis dependency on postgis to a - recommendation. + recommendation. Downgrade several conflicts to breaks. * Upgrade postgresql-9.1-java misc-depends from suggestion to dependency. - * Fix a common spelling error in liblwgeom/lwout_wkt.c. - * Ignore changes to auto-updated files (via source/options). Let + * Add patch fix-spelling: fixes a common spelling error in + liblwgeom/lwout_wkt.c. + * Ignore changes of some auto-updated files (via source/options). Let debian/rules cleanup some more generated files. - * rules: swap dh_makeshlibs and dh_installdeb. + * rules: swap dh_makeshlibs and dh_installdeb, build in the appropriate + build targets, let install only install pre-built stuff. + * Compile the postgis jdbc java library again, using maven directly. Add + 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. + * 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, + rename liblwgeom2 to liblwgeom-2.0.3-0 accordingly. + * Add patch java-version-fix: Corrects java jdbc jar version. + * Policy updated to 3.9.4. No changes. + * Update debian/copyright a bit. * Update and improve watchfile. - + [Stephen Frost] * Split out liblwgeom2 and liblwgeom-dev from postgis. * Add patches debian-versions and link-liblwgeom. @@ -24,7 +40,7 @@ postgis (2.0.3-1) UNRELEASED; urgency=low * Removed old patches (generator, html_doc_resources, install) * Added patch fixmakedoc for doc/Makefile.comments. - -- Markus Wanner <mar...@bluegap.ch> Fri, 12 Apr 2013 13:02:33 +0200 + -- Markus Wanner <mar...@bluegap.ch> Mon, 15 Apr 2013 22:12:27 +0200 postgis (1.5.3-2) unstable; urgency=low diff --git a/debian/control b/debian/control index 864f08a..679a606 100644 --- a/debian/control +++ b/debian/control @@ -2,87 +2,130 @@ Source: postgis Section: misc Priority: optional Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org> -Uploaders: Stephen Frost <sfr...@debian.org>, Francesco Paolo Lovergine <fran...@debian.org> -Build-Depends: debhelper (>= 8), autotools-dev, flex, bison, libgeos-dev (>= 3.1.1), +Uploaders: Stephen Frost <sfr...@debian.org>, Francesco Paolo + Lovergine <fran...@debian.org> +Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.16.1~), autotools-dev, + flex, bison, libgeos-dev (>= 3.1.1), libproj-dev (>= 4.5.0), libssl-dev, xsltproc, docbook, docbook-xsl, default-jdk, libpg-java, fastjar, libjts-java (>= 1.7), imagemagick, - libcunit1-dev, dblatex, libxml2-dev, libgtk2.0-dev, - postgresql-server-dev-9.1, ant, libgdal-dev -Standards-Version: 3.9.2 + libcunit1-dev, dblatex, libxml2-dev, libgtk2.0-dev, libgdal-dev, + postgresql-server-dev-9.1 +Build-Depends-Indep: libpostgresql-jdbc-java, libsurefire-java, + libmaven-clean-plugin-java, libmaven-compiler-plugin-java, + libmaven-jar-plugin-java, maven2 +Standards-Version: 3.9.4 Homepage: http://postgis.refractions.net/ Vcs-Browser: http://git.debian.org/?p=pkg-grass/postgis.git Vcs-Git: git://git.debian.org/git/pkg-grass/postgis.git Package: postgresql-9.1-postgis -Architecture: any -Depends: ${shlibs:Depends}, postgresql-9.1, ${misc:Depends} +Depends: ${shlibs:Depends}, postgresql-9.1, postgis-scripts2.0.3, + ${misc:Depends} Recommends: postgis -Conflicts: postgis (<< 1.2.1) +Breaks: postgis (<< 1.2.1) +Architecture: any Description: Geographic objects support for PostgreSQL 9.1 - 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". + 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 package supports PostgreSQL 9.1. Package: postgis +Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: postgresql-9.1-postgis -Architecture: any -Description: Geographic objects support for PostgreSQL -- common 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". +Description: Geographic objects support for PostgreSQL + 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 package contains the PostGIS userland binaries, common files. + +Package: postgis-doc +Section: doc +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: postgis +Description: Geographic objects support for PostgreSQL -- documentation + 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 package contains the PostGIS documentation. + +Package: postgis-scripts2.0.3 +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: postgresql-9.1-postgis +Description: Geographic objects support for PostgreSQL 9.1 -- scripts + 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 package contains the PostGIS userland binaries, common files and - documentation. + This package contains SQL scripts to upgrade from earlier PostGIS + versions as well as Perl utility scripts. Package: libpostgis-java Architecture: all Section: java -Depends: libpg-java, ${misc:Depends} +Depends: libpostgresql-jdbc-java, ${misc:Depends} Suggests: postgresql-9.1-postgis -Conflicts: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java +Breaks: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java Replaces: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java Description: Geographic objects support for PostgreSQL -- JDBC support - 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". + 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 package contains JDBC support for PostGIS. -Package: liblwgeom2 +Package: liblwgeom-2.0.3-0 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". + 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 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}) +Depends: ${shlibs:Depends}, ${misc:Depends}, + liblwgeom-2.0.3-0 (= ${binary:Version}) +Breaks: postgis (<< 2.0.0) 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". + 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. + 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/copyright b/debian/copyright index 49c2e4c..e3bb796 100644 --- a/debian/copyright +++ b/debian/copyright @@ -7,6 +7,9 @@ on or about Wed, 31 May 2006 Additional debianization and changes by Stephen Frost <sfr...@debian.org> for PostGIS 1.2.1 on or about Mon, 28 May 2007 21:28:24 -0400 +Additional debianization and changes by Markus Wanner <mar...@bluegap.ch> +for PostGIS 2.0.3 on or about Mon, 15 Apr 2013 22:12:27 +0200 + It was downloaded from http://www.postgis.org/download/ Copyright Holder: Refractions Research @@ -39,5 +42,5 @@ License: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +Public License can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/liblwgeom-2.0.3-0.install b/debian/liblwgeom-2.0.3-0.install new file mode 100644 index 0000000..8c74c36 --- /dev/null +++ b/debian/liblwgeom-2.0.3-0.install @@ -0,0 +1,2 @@ +usr/lib/liblwgeom-2.0.3.so.0.0.0 +usr/lib/liblwgeom-2.0.3.so.0 \ No newline at end of file diff --git a/debian/liblwgeom-dev.install b/debian/liblwgeom-dev.install index 01df5de..16daaa9 100644 --- a/debian/liblwgeom-dev.install +++ b/debian/liblwgeom-dev.install @@ -1,3 +1,3 @@ usr/include -usr/lib/liblwgeom.a -usr/lib/liblwgeom.so +usr/lib/liblwgeom-2.0.3.a +usr/lib/liblwgeom-2.0.3.so diff --git a/debian/liblwgeom2.install b/debian/liblwgeom2.install deleted file mode 100644 index fd61f8a..0000000 --- a/debian/liblwgeom2.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/liblwgeom-2.0.3.so diff --git a/debian/libpostgis-java.install b/debian/libpostgis-java.install new file mode 100644 index 0000000..1d6fb19 --- /dev/null +++ b/debian/libpostgis-java.install @@ -0,0 +1 @@ +java/jdbc/target/postgis-jdbc-*.jar /usr/share/java/ diff --git a/debian/patches/fix-manpages b/debian/patches/fix-manpages new file mode 100644 index 0000000..217c697 --- /dev/null +++ b/debian/patches/fix-manpages @@ -0,0 +1,68 @@ +Description: Properly escape dashes in man pages +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 +Author: Markus Wanner <mar...@bluegap.ch> + +--- a/doc/man/shp2pgsql.1 ++++ b/doc/man/shp2pgsql.1 +@@ -28,7 +28,7 @@ + .LP + The loader has several operating modes distinguished by command line flags: + +-(Note that -a, -c, -d and -p are mutually exclusive.) ++(Note that \-a, \-c, \-d and \-p are mutually exclusive.) + .TP + \fB\-d\fR + Drops the database table before creating a new table with the data in the +@@ -50,8 +50,8 @@ + .TP + \fB\-D\fR + Use the PostgreSQL "dump" format for the output data. This can be combined +-with -a, -c and -d. It is much faster to load than the default "insert" SQL +-format. Use this for very large data sets. ++with \-a, \-c and \-d. It is much faster to load than the default "insert" ++SQL format. Use this for very large data sets. + .TP + \fB\-w\fR + Output WKT format, instead of WKB. Note that this can +@@ -61,12 +61,12 @@ + Execute each statement on its own, without using a transaction. + This allows loading of the majority of good data when there are some bad + geometries that generate errors. Note that this cannot be used with the +--D flag as the "dump" format always uses a transaction. ++\-D flag as the "dump" format always uses a transaction. + .TP + \fB\-s\fR [<\fIFROM_SRID\fR>:]<\fISRID\fR> + Creates and populates the geometry tables with the specified SRID. + If FROM_SRID is given, the geometries will be reprojected. +-Reprojection cannot be used with -D. ++Reprojection cannot be used with \-D. + .TP + \fB\-G\fR + Use the geography type instead of geometry. Geography is used to store +@@ -102,12 +102,12 @@ + .TP + \fB\-T\fR <\fItablespace\fR> + Specify the tablespace for the new table. Indexes will still use the +-default tablespace unless the -X parameter is also used. The PostgreSQL ++default tablespace unless the \-X parameter is also used. The PostgreSQL + documentation has a good description on when to use custom tablespaces. + .TP + \fB\-X\fR <\fItablespace\fR> + Specify the tablespace for the new table's indexes. This applies to +-the primary key index, and the GIST spatial index if -I is also used. ++the primary key index, and the GIST spatial index if \-I is also used. + .TP + \fB\-?\fR + Display version and usage information. +--- a/doc/man/pgsql2shp.1 ++++ b/doc/man/pgsql2shp.1 +@@ -93,7 +93,7 @@ + An example session using the dumper to create shape file from a database might + look like this: + +-# \fBpgsql2shp -f myfile -p 5555 my_db roads_table\fR ++# \fBpgsql2shp \-f myfile \-p 5555 my_db roads_table\fR + + .SH "AUTHORS" + .LP diff --git a/debian/patches/fix-spelling.diff b/debian/patches/fix-spelling similarity index 91% rename from debian/patches/fix-spelling.diff rename to debian/patches/fix-spelling index ab43b82..e32c455 100644 --- a/debian/patches/fix-spelling.diff +++ b/debian/patches/fix-spelling @@ -1,3 +1,7 @@ +Description: Minor spelling fix: recieved -> received +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 + --- a/liblwgeom/lwout_wkt.c +++ b/liblwgeom/lwout_wkt.c @@ -325,7 +325,7 @@ diff --git a/debian/patches/fixmakedoc b/debian/patches/fixmakedoc index 3741f5c..5529d03 100644 --- a/debian/patches/fixmakedoc +++ b/debian/patches/fixmakedoc @@ -1,22 +1,7 @@ ---- a/doc/Makefile.comments -+++ b/doc/Makefile.comments -@@ -40,10 +40,10 @@ - # If REGRESS=1 passed as a parameter, change the default install paths - # so that no prefix is included. This allows us to relocate to a temporary - # directory for regression testing. --ifeq ($(REGRESS),1) -- bindir=/bin -- pkglibdir=/lib -- datadir=/share -- datamoduledir=contrib/postgis --endif -+#ifeq ($(REGRESS),1) -+ #bindir=/bin -+ #pkglibdir=/lib -+ #datadir=/share -+ #datamoduledir=contrib/postgis -+#endif - +Description: Not sure why exactly we need this... +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 + --- a/doc/Makefile +++ b/doc/Makefile @@ -244,7 +244,7 @@ @@ -28,4 +13,3 @@ uninstall: comments-uninstall - diff --git a/debian/patches/java-version-fix b/debian/patches/java-version-fix new file mode 100644 index 0000000..742f5d5 --- /dev/null +++ b/debian/patches/java-version-fix @@ -0,0 +1,28 @@ +Description: Correct postgis java jdbc version. +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 + +--- a/java/jdbc/pom.xml ++++ b/java/jdbc/pom.xml +@@ -60,9 +60,9 @@ + <url>http://trac.osgeo.org/postgis/</url> + </issueManagement> + <scm> +- <url>http://trac.osgeo.org/postgis/browser/tags/2.0.0</url> +- <connection>scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/</connection> +- <developerConnection>scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/</developerConnection> ++ <url>http://trac.osgeo.org/postgis/browser/tags/2.0.3</url> ++ <connection>scm:svn:http://svn.osgeo.org/postgis/tags/2.0.3/</connection> ++ <developerConnection>scm:svn:http://svn.osgeo.org/postgis/tags/2.0.3/</developerConnection> + </scm> + + <build> +@@ -176,7 +176,7 @@ + <properties> + <POSTGIS_MAJOR_VERSION>2</POSTGIS_MAJOR_VERSION> + <POSTGIS_MINOR_VERSION>0</POSTGIS_MINOR_VERSION> +- <POSTGIS_MICRO_VERSION>2SVN</POSTGIS_MICRO_VERSION> ++ <POSTGIS_MICRO_VERSION>3</POSTGIS_MICRO_VERSION> + </properties> + + </project> diff --git a/debian/patches/link-liblwgeom b/debian/patches/link-liblwgeom index 073480d..6018090 100644 --- a/debian/patches/link-liblwgeom +++ b/debian/patches/link-liblwgeom @@ -1,28 +1,171 @@ Description: Dynamically link to liblwgeom Instead of statically pulling liblwgeom into the postgis.so, dynamically - link to it. -Author: Stephen Frost <sfr...@snowman.net> -Last-Update: 2012-10-13 + link to it. Rename to liblwgeom-2.0.3 +Author: Stephen Frost <sfr...@snowman.net>, Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 --- 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 +@@ -65,14 +65,8 @@ + OBJS=$(PG_OBJS) + + # Libraries to link into the module (proj, geos) +-# +-# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using +-# -L... -l options to prevent issues with some platforms trying to link +-# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an +-# 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@ ++SHLIB_LINK_F = -L../liblwgeom/.libs -llwgeom-2.0.3 ../libpgcommon/libpgcommon.a @SHLIB_LINK@ # Extra files to remove during 'make clean' EXTRA_CLEAN=$(SQL_OBJS) legacy_uninstall.sql +@@ -114,16 +108,16 @@ + # Make all PostGIS objects depend upon liblwgeom, so that if an underlying + # change is made, a PostGIS rebuild is triggered. + # +-# Also they are all dependent on postgis_config.h ++# Also they are all dependent on postgis_config.h + # and thus postgis_svn_revision.h + # +-$(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postgis_config.h ../postgis_svn_revision.h ++$(PG_OBJS): ../liblwgeom/.libs/liblwgeom-2.0.3.a ../libpgcommon/libpgcommon.a ../postgis_config.h ../postgis_svn_revision.h + + ../postgis_svn_revision.h: + $(MAKE) -C .. postgis_svn_revision.h + +-../liblwgeom/.libs/liblwgeom.a: +- make -C ../liblwgeom liblwgeom.la ++../liblwgeom/.libs/liblwgeom-2.0.3.a: ++ make -C ../liblwgeom liblwgeom-2.0.3.la + + ../libpgcommon/libpgcommon.a: + make -C ../libpgcommon libpgcommon.a --- 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 - # +@@ -27,14 +27,7 @@ + OBJS=rt_pg.o + + # Libraries to link into the module (proj, geos) +-# +-# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using +-# -L... -l options to prevent issues with some platforms trying to link +-# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an +-# 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_LDFLAGS=-L../../liblwgeom/.libs -llwgeom-2.0.3 LIBLWGEOM_CFLAGS="-I../../liblwgeom" LIBPGCOMMON_CFLAGS="-I../../libpgcommon" LIBPGCOMMON_LDFLAGS=../../libpgcommon/libpgcommon.a +@@ -88,7 +81,7 @@ + + + # Objects dependencies +-$(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_svn_revision.h ++$(OBJS): ../../liblwgeom/.libs/liblwgeom-2.0.3.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_svn_revision.h + + # Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor + $(SQL_OBJS): %.in: %.in.c +--- a/liblwgeom/Makefile.in ++++ b/liblwgeom/Makefile.in +@@ -101,18 +101,18 @@ + lwgeom_log.h \ + lwgeom_geos.h + +-all: liblwgeom.la ++all: liblwgeom-$(SOVER).la + + install: install-liblwgeom + + uninstall: uninstall-liblwgeom + +-install-liblwgeom: liblwgeom.la +- $(LIBTOOL) --mode=install $(INSTALL) liblwgeom.la "$(DESTDIR)$(libdir)/liblwgeom.la" ++install-liblwgeom: liblwgeom-$(SOVER).la ++ $(LIBTOOL) --mode=install $(INSTALL) liblwgeom-$(SOVER).la "$(DESTDIR)$(libdir)/liblwgeom-$(SOVER).la" + $(INSTALL) liblwgeom.h "$(DESTDIR)$(includedir)/liblwgeom.h" + + uninstall-liblwgeom: +- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/liblwgeom.la" ++ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/liblwgeom-$(SOVER).la" + + # Make all objects depend upon postgis_config.h and postgis_svn_revision.h + $(LT_OBJS): ../postgis_config.h ../postgis_svn_revision.h +@@ -121,10 +121,11 @@ + $(MAKE) -C .. postgis_svn_revision.h + + #liblwgeom.a: $(SA_OBJS) $(NM_OBJS) $(SA_HEADERS) +-#ar rs liblwgeom.a $(SA_OBJS) $(NM_OBJS) ++#ar rs liblwgeom.a $(SA_OBJS) $(NM_OBJS) + +-liblwgeom.la: $(LT_OBJS) $(SA_HEADERS) +- $(LIBTOOL) --tag=CC --mode=link $(CC) -rpath $(libdir) $(LT_OBJS) -release $(SOVER) $(LDFLAGS) -o $@ ++liblwgeom-$(SOVER).la: $(LT_OBJS) $(SA_HEADERS) ++ $(LIBTOOL) --tag=CC --mode=link $(CC) -rpath $(libdir) $(LT_OBJS) \ ++ $(LDFLAGS) -o $@ + + maintainer-clean: clean + rm -f lwin_wkt_lex.c +@@ -134,7 +135,7 @@ + clean: + $(MAKE) -C cunit clean + rm -f $(LT_OBJS) $(SA_OBJS) $(NM_OBJS) +- rm -f liblwgeom.la ++ rm -f liblwgeom.la liblwgeom-$(SOVER).la + rm -rf .libs + + distclean: clean +@@ -157,7 +158,7 @@ + parser: + $(YACC) -o'lwin_wkt_parse.c' -d lwin_wkt_parse.y + $(LEX) -i lwin_wkt_lex.l +- ++ + # $(YACC) --debug --verbose -o'$@' -d $< + # $(YACC) -o'$@' -d $^ + # $(LEX) -i $< +--- a/raster/loader/Makefile.in ++++ b/raster/loader/Makefile.in +@@ -31,7 +31,7 @@ + + RT_CORE=../rt_core + +-LIBLWGEOM_LDFLAGS=../../liblwgeom/liblwgeom.la ++LIBLWGEOM_LDFLAGS=-L../../liblwgeom/.libs -llwgeom-2.0.3 + LIBLWGEOM_CFLAGS=-I../../liblwgeom + LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@ + LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@ +--- a/loader/Makefile.in ++++ b/loader/Makefile.in +@@ -42,7 +42,7 @@ + ICONV_CFLAGS=@ICONV_CFLAGS@ + + # liblwgeom +-LIBLWGEOM=../liblwgeom/liblwgeom.la ++LIBLWGEOM=../liblwgeom/liblwgeom-2.0.3.la + + # GTK includes and libraries + GTK_CFLAGS = @GTK_CFLAGS@ @IGE_MAC_CFLAGS@ +--- a/doc/html/image_src/Makefile.in ++++ b/doc/html/image_src/Makefile.in +@@ -152,12 +152,12 @@ + convert $@ -resize 100x100 $@ + + # Build the main executable +-generator: ../../../liblwgeom/.libs/liblwgeom.a $(OBJS) +- $(CC) -o $@ $(OBJS) ../../../liblwgeom/.libs/liblwgeom.a -lm $(CUNIT_LDFLAGS) ++generator: ../../../liblwgeom/.libs/liblwgeom-2.0.3.a $(OBJS) ++ $(CC) -o $@ $(OBJS) ../../../liblwgeom/.libs/liblwgeom-2.0.3.a -lm $(CUNIT_LDFLAGS) + + # Build liblwgeom +-../../../liblwgeom/.libs/liblwgeom.a: +- make -C ../../../liblwgeom liblwgeom.la ++../../../liblwgeom/.libs/liblwgeom-2.0.3.a: ++ make -C ../../../liblwgeom liblwgeom-2.0.3.la + + # Clean target + clean: diff --git a/debian/patches/series b/debian/patches/series index 48a2662..f56c492 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,7 @@ -fixmakedoc -fix-spelling.diff debian-versions +java-version-fix +fixmakedoc +fix-spelling link-liblwgeom +use-debian-maven +fix-manpages diff --git a/debian/patches/use-debian-maven b/debian/patches/use-debian-maven new file mode 100644 index 0000000..228f800 --- /dev/null +++ b/debian/patches/use-debian-maven @@ -0,0 +1,59 @@ +Description: Adjust maven pom file to integrate with Debian +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-14 + +--- a/java/jdbc/build.xml ++++ b/java/jdbc/build.xml +@@ -53,13 +53,8 @@ + <pathelement location="postgis_${postgis_version}.jar"/> + </path> + +- + <!-- Loading Maven dependencies --> +- <mkdir dir="lib"/> +- <get src="http://www.apache.org/dist/maven/ant-tasks/2.1.3/binaries/maven-ant-tasks-2.1.3.jar" +- dest="lib/maven-ant-tasks-2.1.3.jar"/> +- +- <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" /> ++ <path id="maven-ant-tasks.classpath" path="/usr/share/java/maven-ant-tasks.jar" /> + <typedef resource="org/apache/maven/artifact/ant/antlib.xml" + uri="antlib:org.apache.maven.artifact.ant" + classpathref="maven-ant-tasks.classpath" /> +--- a/java/jdbc/pom.xml ++++ b/java/jdbc/pom.xml +@@ -82,10 +82,23 @@ + </resource> + </resources> + +- <plugins><!-- +- ++ <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> ++ <artifactId>maven-jar-plugin</artifactId> ++ <configuration> ++ <archive> ++ <manifest> ++ <addClasspath>true</addClasspath> ++ </manifest> ++ <manifestEntries> ++ <Class-Path>/usr/share/java/postgresql-jdbc.jar</Class-Path> ++ </manifestEntries> ++ </archive> ++ </configuration> ++ </plugin> ++ <!--<plugin> ++ <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> +@@ -120,6 +133,8 @@ + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>9.1-901.jdbc3</version> ++ <scope>system</scope> ++ <systemPath>/usr/share/java/postgresql-jdbc3-9.1.jar</systemPath> + </dependency> + </dependencies> + <reporting> + diff --git a/debian/postgis-doc.doc-base b/debian/postgis-doc.doc-base new file mode 100644 index 0000000..b290167 --- /dev/null +++ b/debian/postgis-doc.doc-base @@ -0,0 +1,7 @@ +Document: doc-base +Title: PostGIS 2.0 Manual +Section: Science/Geoscience + +Format: HTML +Index: /usr/share/doc/postgis-doc/postgis.html +Files: /usr/share/doc/postgis-doc/*.html \ No newline at end of file diff --git a/debian/postgis-doc.install b/debian/postgis-doc.install new file mode 100644 index 0000000..95ee129 --- /dev/null +++ b/debian/postgis-doc.install @@ -0,0 +1 @@ +usr/share/doc/postgis/postgis.html usr/share/doc/postgis-doc/ \ No newline at end of file diff --git a/debian/postgis-postgresql-generic.postinst.in b/debian/postgis-postgresql-generic.postinst.in index a68220f..5707353 100644 --- a/debian/postgis-postgresql-generic.postinst.in +++ b/debian/postgis-postgresql-generic.postinst.in @@ -2,15 +2,19 @@ set -e -# Creates a link for the shared lib in the postgres area -#if [ "$1" = "configure" ]; then +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-@SOVERSION@.so ]; then # ln -f /usr/lib/postgis/@POSTGIS_VERSION@/postgres/@POSTGRES_VERSION@/lib/postgis-@SOVERSION@.so \ # /usr/lib/postgresql/@POSTGRES_VERSION@/lib/postgis-@SOVERSION@.so # else # echo "Postgis extension not found, something wrong did probably happen" # fi -#fi + + for FILE in /usr/share/postgis/@POSTGIS_VERSION@/sql/*.sql; do + ln -f $FILE /usr/share/postgresql/@POSTGRES_VERSION@/extension/ + done +fi #DEBHELPER# diff --git a/debian/postgis-scripts2.0.3.install b/debian/postgis-scripts2.0.3.install new file mode 100644 index 0000000..9790b32 --- /dev/null +++ b/debian/postgis-scripts2.0.3.install @@ -0,0 +1,3 @@ +extensions/postgis/sql/*.sql /usr/share/postgis/2.0.3/sql/ +extensions/postgis_topology/sql/*.sql /usr/share/postgis/2.0.3/sql/ +utils/*.pl /usr/share/postgis/2.0.3/utils/ diff --git a/debian/postgis.install b/debian/postgis.install index 1db2639..4b40989 100644 --- a/debian/postgis.install +++ b/debian/postgis.install @@ -1,4 +1,3 @@ -usr/share/doc/postgis/postgis/postgis.html usr/share/doc/postgis/ -usr/share/doc/postgis/postgis/README.postgis usr/share/doc/postgis/ +README.postgis usr/share/doc/postgis-doc/ 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 index abf68bb..65f0763 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 +usr/share/postgresql/9.1/extension/*.control usr/lib/postgresql/9.1/lib diff --git a/debian/postgis-generic.postrm.in b/debian/postgresql-postgis-generic.postrm.in similarity index 83% rename from debian/postgis-generic.postrm.in rename to debian/postgresql-postgis-generic.postrm.in index 82f718f..1c3cdbb 100644 --- a/debian/postgis-generic.postrm.in +++ b/debian/postgresql-postgis-generic.postrm.in @@ -4,8 +4,8 @@ set -e # Removes all postgis shared libs links if [ "$1" = "purge" ]; then - for version in @POSTGRES_VERSIONS@ - do + for version in @POSTGRES_VERSIONS@ + do find /usr/lib/postgresql/$version/lib -type f -name "postgis-@SOVERSION@.so" -delete || true done fi diff --git a/debian/rules b/debian/rules index 5821293..0b3a786 100755 --- a/debian/rules +++ b/debian/rules @@ -15,12 +15,20 @@ # This has to be exported to make some magic below work. export DH_OPTIONS +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -CFLAGS = -Wall -g +# Use maven in offline mode. +MVN = mvn --offline -s/etc/maven2/settings-debian.xml + +CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) MAJOR_VERSION = $(shell grep POSTGIS_MAJOR_VERSION Version.config|cut -d= -f2) MINOR_VERSION = $(shell grep POSTGIS_MINOR_VERSION Version.config|cut -d= -f2) @@ -30,31 +38,61 @@ ifeq ($(VERSION),..) $(error Cannot detect Postgis version, fix debian/rules) endif -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - build: build-arch build-indep build-arch: build-arch-stamp -build-arch-stamp: +build-arch-stamp: configuration-stamp + $(MAKE) + $(MAKE) -C doc + touch $@ build-indep: build-indep-stamp -build-indep-stamp: +build-indep-stamp: configuration-stamp +# Documentation and common files for PostGIS +# [ ! -f doc/html/postgis.html.prev -a -f doc/html/postgis.html ] && cp doc/html/postgis.html doc/html/postgis.html.prev || true + +# PostGIS JDBC (with debug support) + cd $(CURDIR)/java/jdbc && $(MVN) package + +# Let PostGIS create a perl script from postgis_restore.pl.in + $(MAKE) -C utils + touch $@ +configuration: configuration-stamp +configuration-stamp: + dh_testdir + dh_prep -s +# Documentation and common files for PostGIS + [ ! -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 \ + --exec-prefix=\$${prefix} \ + --datadir=\$${prefix}/share/postgresql-9.1-postgis \ + --docdir=\$${prefix}/share/doc \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config \ + --with-gui + + touch $@ + + 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 + cd $(CURDIR)/java/jdbc && $(MVN) clean $(MAKE) -C doc images-clean rm -f $(CURDIR)/debian/*.postinst $(CURDIR)/debian/*.postrm - rm -rf postgis/postgis_upgrade_20_minor.sql.in raster/rt_pg/rtpostgis_drop.sql \ + rm -f postgis/postgis_upgrade_20_minor.sql.in raster/rt_pg/rtpostgis_drop.sql \ raster/rt_pg/rtpostgis_upgrade_cleanup.sql dh_clean @@ -64,60 +102,33 @@ install-indep: build-indep dh_testroot dh_prep -i dh_installdirs -i -# CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure - ./configure \ - --docdir=\$${prefix}/share/doc/postgis \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config - # regress target uses pushd/popd - $(MAKE) SHELL=/bin/bash distclean + $(MAKE) -C doc docs-install \ + DESTDIR=$(CURDIR)/debian/tmp \ + PGSQL_DOCDIR=/usr/share/doc \ + PGSQL_SHAREDIR=/usr/share/postgresql/9.1 + dh_install -i install-arch: build-arch dh_testdir dh_testroot - dh_prep -s + dh_prep -s dh_installdirs -s - # Documentation and common files for PostGIS - [ ! -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 \ - --exec-prefix=\$${prefix} \ - --datadir=\$${prefix}/share/postgresql-9.1-postgis \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config \ - --with-gui - $(MAKE) - $(MAKE) -C doc + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - $(MAKE) -C doc docs-install man-install install \ + $(MAKE) -C doc man-install \ DESTDIR=$(CURDIR)/debian/tmp \ - PGSQL_DOCDIR=/usr/share/doc/postgis \ + 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/@POSTGIS_VERSION@/$(VERSION)/' \ - -e 's/@POSTGRES_VERSION@/9.1/' \ - -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ - $(CURDIR)/debian/postgis-postgresql-generic.postinst.in >$(CURDIR)/debian/postgresql-9.1-postgis.postinst - + +# Create custom maint scripts: 9.1 sed -e 's/@POSTGRES_VERSIONS@/9.1/' \ -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ - $(CURDIR)/debian/postgis-generic.postrm.in >$(CURDIR)/debian/postgresql-9.1-postgis.postrm + $(CURDIR)/debian/postgresql-postgis-generic.postrm.in >$(CURDIR)/debian/postgresql-9.1-postgis.postrm dh_install -s - - # copy utils for 9.1 - mkdir -p $(CURDIR)/debian/postgresql-9.1-postgis/usr/share/postgresql-9.1-postgis/utils - cp utils/*.pl utils/README $(CURDIR)/debian/postgresql-9.1-postgis/usr/share/postgresql-9.1-postgis/utils check: install-arch $(MAKE) check -- PostGIS for PostgreSQL _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel