The following commit has been merged in the master branch:
commit bf6baa7039afc4a76f55fc43f67a6c978e607d01
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Sun Oct 6 19:22:17 2013 +0200

    Use minimal dh rules, handle Multi-Arch paths.

diff --git a/debian/README.source b/debian/README.source
index 68e7739..37f6c8c 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -22,7 +22,3 @@ and create a couple of suitable patches. The 
reautoconfiscated.diff
 patch can be obtained by running 'autoreconf --install --force --verbose'
 after applying the automake.diff one.
 
-But for that, the package largely predates gnome-menus for managing
-multiple builds of the python extension with cdbs. Kudos to Sebastien
-Bacher for the original hack.
-
diff --git a/debian/changelog b/debian/changelog
index b3e05f3..e638e1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,7 @@ libkml (1.3.0~r864-1) UNRELEASED; urgency=low
   * Move .so symlinks from java packages to libkml-dev.
   * Update copyright file using copyright-format 1.0.
   * Add lintian override for source-contains-prebuilt-windows-binary.
+  * Use minimal dh rules, handle Multi-Arch paths.
 
  -- Bas Couwenberg <sebas...@xs4all.nl>  Sat, 05 Oct 2013 21:15:09 +0200
 
diff --git a/debian/control b/debian/control
index 0207d36..4befdc5 100644
--- a/debian/control
+++ b/debian/control
@@ -4,10 +4,10 @@ Priority: extra
 Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
 Uploaders: Francesco Paolo Lovergine <fran...@debian.org>
  , Bas Couwenberg <sebas...@xs4all.nl>
-Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 9), autotools-dev, 
libexpat1-dev, zlib1g-dev, default-jdk,
+Build-Depends: debhelper (>= 9), autotools-dev, libexpat1-dev, zlib1g-dev, 
default-jdk,
  python-dev (>=  2.6.6-3~), python-all-dev (>= 2.6.6-3~), liburiparser-dev (>= 
0.7.1), chrpath,
  libcurl4-openssl-dev, swig
-X-Python-Version: >= 2.5
+X-Python-Version: 2.7
 Standards-Version: 3.9.3
 Homepage: http://code.google.com/p/libkml/
 Vcs-Git: git://anonscm.debian.org/pkg-grass/libkml.git
@@ -15,6 +15,7 @@ Vcs-Browser: 
http://anonscm.debian.org/gitweb/?p=pkg-grass/libkml.git
 
 Package: libkml0
 Architecture: any
+Multi-Arch: same
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Library to manipulate KML 2.2 OGC standard files
@@ -28,6 +29,7 @@ Description: Library to manipulate KML 2.2 OGC standard files
 
 Package: libkml-dev
 Architecture: any
+Multi-Arch: same
 Section: libdevel
 Depends: libkml0 (= ${binary:Version}), libkml-java (= ${binary:Version}), 
liburiparser-dev (>= 0.7.1),
  ${shlibs:Depends}, ${misc:Depends}
@@ -42,6 +44,7 @@ Description: Library to manipulate KML 2.2 OGC standard files 
- development file
 
 Package: libkml-java
 Architecture: any
+Multi-Arch: same
 Section: java
 Depends: libkml0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Description: Library to manipulate KML 2.2 OGC standard files - Java package
@@ -64,3 +67,4 @@ Description: Library to manipulate KML 2.2 OGC standard files 
- Python extension
  bindings are available via SWIG to Java and Python.                    
  .
  This package contains required extensions for Python applications.
+
diff --git a/debian/libkml-dev.install b/debian/libkml-dev.install
index 180a86d..25e62ce 100644
--- a/debian/libkml-dev.install
+++ b/debian/libkml-dev.install
@@ -1,4 +1,3 @@
 usr/include/
-usr/lib/lib*.so
-usr/lib/lib*.a
-usr/lib/libkml/*.so usr/lib
+usr/lib/*/lib*.so
+usr/lib/*/lib*.a
diff --git a/debian/libkml-java.install b/debian/libkml-java.install
index 86e806e..cf75aaf 100644
--- a/debian/libkml-java.install
+++ b/debian/libkml-java.install
@@ -1,2 +1,4 @@
 usr/share/java
-usr/lib/libkml/libkml*_swig_java*.so.* usr/lib
+usr/lib/*/libkmlbase_swig_java.so.*
+usr/lib/*/libkmldom_swig_java.so.*
+usr/lib/*/libkmlengine_swig_java.so.*
diff --git a/debian/libkml0.install b/debian/libkml0.install
index d0dbfd1..3b92661 100644
--- a/debian/libkml0.install
+++ b/debian/libkml0.install
@@ -1 +1,7 @@
-usr/lib/lib*.so.*
+usr/lib/*/libkmlbase.so.*
+usr/lib/*/libkmlconvenience.so.*
+usr/lib/*/libkmldom.so.*
+usr/lib/*/libkmlengine.so.*
+usr/lib/*/libkmlregionator.so.*
+usr/lib/*/libkmlxsd.so.*
+usr/lib/*/libminizip.so.*
diff --git a/debian/libkml0.lintian-overrides b/debian/libkml0.lintian-overrides
index b86e2fd..a144e2e 100644
--- a/debian/libkml0.lintian-overrides
+++ b/debian/libkml0.lintian-overrides
@@ -2,4 +2,4 @@
 # Fortify Source functions: no, only unprotected functions found!
 #  unprotected: memcpy
 #  unprotected: fread
-libkml0: hardening-no-fortify-functions usr/lib/libminizip.so.0.0.0
+libkml0: hardening-no-fortify-functions usr/lib/*/libminizip.so.0.0.0
diff --git a/debian/rules b/debian/rules
index 5335b57..5278bf3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,62 +1,41 @@
 #!/usr/bin/make -f
 
-PY_VERSIONS = $(shell pyversions --requested debian/control)
-
 JAVA_HOME = /usr/lib/jvm/default-java
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-
 DEB_CONFIGURE_EXTRA_FLAGS = --enable-systempython 
--with-java-include-dir=$(JAVA_HOME)/include
-DEB_MAKE_CHECK_TARGET = check
 
-DEB_BUILDDIR := build
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-# These targets do allow building multiple Python versions extensions
-# when autoconf is used - as in this case - instead of Distutils.
+%:
+       dh $@ --with python2
 
-configure/python-kml:: $(addprefix configure-stamp-, $(PY_VERSIONS))
+override_dh_auto_configure:
+       dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)
 
-configure-stamp-%:
-       mkdir build-$*
-       cd build-$* && PYTHON=`which $*` $(DEB_CONFIGURE_SCRIPT_ENV) \
-                       $(DEB_CONFIGURE_SCRIPT) \
-                       $(DEB_CONFIGURE_NORMAL_ARGS) \
-                       --disable-maintainer-mode \
-                       $(cdbs_configure_flags) \
-                       $(DEB_CONFIGURE_EXTRA_FLAGS) \
-                       $(DEB_CONFIGURE_USER_FLAGS)
-       touch $@
+override_dh_auto_install:
+       dh_auto_install
 
-build-stamp-%:
-       $(MAKE) -C build-$* PYTHON=`which $*`
-       touch $@
+       # Strip RPATH
+       chrpath --delete $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/*.so
 
-build/python-kml:: $(addprefix build-stamp-, $(PY_VERSIONS))
+       # Remove autotools stuff
+       find $(CURDIR)/examples/ -type f -name "Makefile*" -delete
 
-install-stamp-%:
-       $(MAKE) -C build-$* PYTHON=`which $*` DESTDIR=$(CURDIR)/debian/tmp 
install
-       touch $@
+       # Remove python swig
+       find $(CURDIR)/debian/tmp/usr/lib -name "libkml*python*.so*" -delete
 
-install/python-kml:: $(addprefix install-stamp-, $(PY_VERSIONS))
+       # Remove la files
+       find $(CURDIR)/debian/tmp/usr/lib -name "*.la" -delete
 
-binary-install/python-kml:: install/python-kml
-       # removes build-time rpaths
-       for version in $(PY_VERSIONS); \
-       do \
-               chrpath --delete 
$(CURDIR)/debian/python-kml/usr/lib/$$version/*-packages/*.so ; \
-       done
-       dh_python2 -ppython-kml
+       # Move libraries from libkml subdirectory
+       mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libkml/* 
$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
 
-binary-install/libkml-dev::
-       # removes autotools stuff
-       find $(CURDIR)/debian/libkml-dev/usr/share/doc/libkml-dev/examples 
-type f -name "Makefile.*" -delete
-       # removes python related stuff
-       find $(CURDIR)/debian/libkml-dev/usr/lib -name "libkml*python*.so*" 
-delete
-
-clean::
-       -rm -rf $(addprefix build-, $(PY_VERSIONS))
-       -rm -rf $(addprefix configure-stamp-, $(PY_VERSIONS))
-       -rm -rf $(addprefix build-stamp-, $(PY_VERSIONS))
-       -rm -rf $(addprefix install-stamp-, $(PY_VERSIONS))
+override_dh_install:
+       dh_install --autodest --list-missing
+
+override_dh_makeshlibs:
+       dh_makeshlibs -Xpython-kml
+
+override_dh_python:
+       dh_python2 -ppython-kml
 

-- 
A library to manipulate KML 2.2 OGC standard files

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to