Hi, I worked this morning on building PostGis 1.5.1 for PostgreSQL 9.0. I attached a patch which updates some debian files.
There are the main lines: * Added a patch to fix PGXS override for Postgresql < 8.5 * Added postgresql-9.0-postgis package to debian/control * Added postgresql-9.0-postgis building rules to debian/rules I think my work can help you... Chears, Alexis Lahouze.
Index: debian/control =================================================================== --- debian/control (révision 2947) +++ debian/control (copie de travail) @@ -3,7 +3,7 @@ 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 (>= 7), autotools-dev, flex, bison, postgresql-server-dev-8.4, +Build-Depends: debhelper (>= 7), autotools-dev, flex, bison, postgresql-server-dev-8.4, postgresql-server-dev-9.0, libgeos-dev (>= 3.1.1), libproj-dev (>= 4.5.0), libssl-dev, xsltproc, docbook, docbook-xsl, libpg-java, default-jdk, fastjar, libjts-java (>= 1.7), dpatch, imagemagick, libcunit1-dev, dblatex, libxml2-dev Standards-Version: 3.8.4 @@ -11,6 +11,19 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-grass/packages/postgis/ Vcs-Svn: svn://svn.debian.org/pkg-grass/packages/postgis/ +Package: postgresql-9.0-postgis +Architecture: any +Depends: ${shlibs:Depends}, postgis, postgresql-9.0, ${misc:Depends} +Conflicts: postgis (<< 1.2.1) +Description: geographic objects support for PostgreSQL 9.0 + 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.0. + Package: postgresql-8.4-postgis Architecture: any Depends: ${shlibs:Depends}, postgis, postgresql-8.4, ${misc:Depends} @@ -25,7 +38,7 @@ This package supports PostgreSQL 8.4. Package: postgis -Suggests: postgresql-8.4-postgis +Suggests: postgresql-8.4-postgis, postgresql-9.0-postgis Depends: ${shlibs:Depends}, ${misc:Depends} Architecture: any Description: geographic objects support for PostgreSQL -- common files @@ -42,7 +55,7 @@ Architecture: all Section: java Depends: libpg-java -Suggests: postgresql-8.4-postgis, ${misc:Depends} +Suggests: postgresql-8.4-postgis, postgresql-9.0-postgis, ${misc:Depends} Conflicts: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java Replaces: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java Description: geographic objects support for PostgreSQL -- JDBC support Index: debian/patches/configure-pgxs.dpatch =================================================================== --- debian/patches/configure-pgxs.dpatch (révision 0) +++ debian/patches/configure-pgxs.dpatch (révision 0) @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## configure-pgxs.dpatch by <alaho...@fr400758-q209> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' postgis-1.5.1~/configure.ac postgis-1.5.1/configure.ac +--- postgis-1.5.1~/configure.ac 2010-11-19 11:54:14.000000000 +0100 ++++ postgis-1.5.1/configure.ac 2010-11-19 11:55:08.870293892 +0100 +@@ -332,7 +332,7 @@ + dnl Temporary hack until minimum PostgreSQL version is 8.5: + dnl If PostgreSQL < 8.5 is detected, trigger the inclusion of the new versioned PGXS targets + PGXSOVERRIDE=0 +-if test ! "$PGSQL_MINOR_VERSION" -ge 5; then ++if test ! "$PGSQL_MAJOR_VERSION" -eq 9 -a "$PGSQL_MINOR_VERSION" -ge 5; then + PGXSOVERRIDE=1 + fi + Modification de propriétés sur debian/patches/configure-pgxs.dpatch ___________________________________________________________________ Ajouté : svn:executable + * Index: debian/patches/00list =================================================================== --- debian/patches/00list (révision 2947) +++ debian/patches/00list (copie de travail) @@ -1,3 +1,4 @@ install generator getopt +configure-pgxs Index: debian/rules =================================================================== --- debian/rules (révision 2947) +++ debian/rules (copie de travail) @@ -64,6 +64,7 @@ dh_testroot dh_prep -i dh_installdirs -i + ./autogen.sh # CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure ./configure \ --docdir=\$${prefix}/share/doc/postgis \ @@ -82,6 +83,7 @@ dh_testroot dh_prep -s dh_installdirs -s + ./autogen.sh # Documentation and common files for PostGIS [ ! -f doc/html/postgis.html.prev ] && cp doc/html/postgis.html doc/html/postgis.html.prev || true @@ -109,8 +111,34 @@ install -o root -g root -d $(CURDIR)/debian/postgresql-8.4-postgis/usr/lib/postgis/$(VERSION)/postgres/8.4/lib mv $(CURDIR)/debian/postgresql-8.4-postgis/usr/lib/postgresql/8.4/lib/postgis-$(MAJOR_VERSION).$(MINOR_VERSION).so \ $(CURDIR)/debian/postgresql-8.4-postgis/usr/lib/postgis/$(VERSION)/postgres/8.4/lib/. - mv $(CURDIR)/debian/postgresql-8.4-postgis/usr/lib/postgresql/8.4/bin $(CURDIR)/debian/postgis/usr + rm -rf $(CURDIR)/debian/postgresql-8.4-postgis/usr/lib/postgresql/8.4/bin + $(MAKE) distclean + # PostGIS for PostgreSQL 9.0 + ./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.0 \ + --datadir=\$${prefix}/share/postgresql-9.0-postgis \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --with-pgconfig=/usr/lib/postgresql/9.0/bin/pg_config + $(MAKE) + $(MAKE) -C doc + $(MAKE) install DESTDIR=$(CURDIR)/debian/postgresql-9.0-postgis + $(MAKE) -C doc install \ + PGSQL_DOCDIR=$(CURDIR)/debian/postgis/usr/share/doc/postgis \ + PGSQL_MANDIR=$(CURDIR)/debian/postgis/usr/share/man \ + PGSQL_SHAREDIR=$(CURDIR)/debian/postgis/usr/share/postgresql/9.0 + install -o root -g root doc/postgis_comments.sql \ + $(CURDIR)/debian/postgresql-9.0-postgis/usr/share/postgresql/9.0/contrib/. + install -o root -g root -d $(CURDIR)/debian/postgresql-9.0-postgis/usr/lib/postgis/$(VERSION)/postgres/9.0/lib + mv $(CURDIR)/debian/postgresql-9.0-postgis/usr/lib/postgresql/9.0/lib/postgis-$(MAJOR_VERSION).$(MINOR_VERSION).so \ + $(CURDIR)/debian/postgresql-9.0-postgis/usr/lib/postgis/$(VERSION)/postgres/9.0/lib/. + mv $(CURDIR)/debian/postgresql-9.0-postgis/usr/lib/postgresql/9.0/bin $(CURDIR)/debian/postgis/usr + # Create custom maint scripts sed -e 's/@POSTGIS_VERSION@/$(VERSION)/' \ @@ -118,8 +146,13 @@ -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ $(CURDIR)/debian/postgis-postgresql-generic.postinst.in >$(CURDIR)/debian/postgresql-8.4-postgis.postinst - sed -e 's/@POSTGRES_VERSIONS@/8.4/' \ + sed -e 's/@POSTGIS_VERSION@/$(VERSION)/' \ + -e 's/@POSTGRES_VERSION@/9.0/' \ -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ + $(CURDIR)/debian/postgis-postgresql-generic.postinst.in >$(CURDIR)/debian/postgresql-9.0-postgis.postinst + + sed -e 's/@POSTGRES_VERSIONS@/8.4 9.0/' \ + -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ $(CURDIR)/debian/postgis-generic.postrm.in >$(CURDIR)/debian/postgis.postrm dh_install -s @@ -127,6 +160,8 @@ # copy utils mkdir -p $(CURDIR)/debian/postgresql-8.4-postgis/usr/share/postgresql-8.4-postgis/utils cp utils/*.pl utils/README $(CURDIR)/debian/postgresql-8.4-postgis/usr/share/postgresql-8.4-postgis/utils + mkdir -p $(CURDIR)/debian/postgresql-9.0-postgis/usr/share/postgresql-9.0-postgis/utils + cp utils/*.pl utils/README $(CURDIR)/debian/postgresql-9.0-postgis/usr/share/postgresql-9.0-postgis/utils check: install-arch $(MAKE) check
_______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel