The following commit has been merged in the master branch:
commit fc813cd53123842e0b9f1bfec2da91c2f10efd0a
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Tue Oct 1 14:03:33 2013 +0200

    Use minimal dh rules with python2.

diff --git a/debian/changelog b/debian/changelog
index 7e66c1e..e0c8bf7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ thuban (1.2.2-4) UNRELEASED; urgency=low
     - wxpython.patch
     - gdal.patch
   * Improve short description to not start with article.
+  * Use minimal dh rules with python2.
 
  -- Bas Couwenberg <sebas...@xs4all.nl>  Tue, 01 Oct 2013 12:42:46 +0200
 
diff --git a/debian/rules b/debian/rules
index b351f60..2de42bb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,65 +5,39 @@
 
 PYDEF=$(shell pyversions -d)
 PYDEFVER=$(shell pyversions -d -v)
-CFLAGS = -Wall -g
+
+CFLAGS += -Wall -g
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         CFLAGS += -O0
 else
         CFLAGS += -O2
 endif
 
-build: build-stamp
-build-stamp: 
-       dh_testdir
-       CFLAGS="$(CFLAGS)" python setup.py build_ext --use-wx-python-swig-hack
-       make -C po mo
-       make -C Doc/manual man-html man-html-de
-       # Needs external data, many failures
-       # cd test ; python runtests.py
-       touch build-stamp
+%:
+       dh $@ --with python2
 
-clean: clean-patched unpatch
-clean-patched: 
-       dh_testdir
-       dh_testroot
-       python setup.py clean
-       #find $(CURDIR) -name "*.mo" -exec rm -f {} \;
-       rm -f build-stamp 
-       rm -rf build Doc/manual/thuban-manual Doc/manual/thuban-manual-de
+override_dh_clean:
        dh_clean
-       rm -f debian/pyversions
 
-install: build
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs
+       python setup.py clean
+
+       $(RM) -rf $(CURDIR)/build
+       $(RM) -rf $(CURDIR)/Doc/manual/thuban-manual
+       $(RM) -rf $(CURDIR)/Doc/manual/thuban-manual-de
+
+override_dh_auto_build:
+       python setup.py build_ext
        
-       python setup.py install --prefix=/usr --no-compile 
--root=$(CURDIR)/debian/thuban
-       rm -f $(CURDIR)/debian/thuban/usr/bin/create_epsg
-       echo $(PYDEFVER) >$(CURDIR)/debian/pyversions
+       find $(CURDIR) -name "*.mo" -delete
+
+       $(MAKE) -C $(CURDIR)/po mo
+       $(MAKE) -C $(CURDIR)/Doc/manual man-html man-html-de
 
-binary-indep: build install
+override_dh_auto_test:
+       # Needs external data, many failures
+       # cd test ; python runtests.py
 
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_install
-       dh_installdocs
-       dh_installexamples
-       dh_installmenu
-       dh_installman
-       dh_installchangelogs 
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_pysupport 
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+override_dh_auto_install:
+       dh_auto_install -- --prefix=/usr
 
-binary: binary-arch binary-indep
-.PHONY: build clean binary-arch binary install clean-patched clean patch 
unpatch
+       $(RM) -f $(CURDIR)/debian/thuban/usr/bin/create_epsg

-- 
Yet another interactive geographic data viewer

_______________________________________________
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