[postgis] 04/08: Rewrite rules file to use dh sequencer.

Bas Couwenberg sebastic at debian.org
Sat Oct 8 21:43:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch modern-packaging
in repository postgis.

commit 61e3e4ce8f56fb0b9ec9de64087ea5da5dc8f7c8
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Oct 8 21:18:12 2016 +0200

    Rewrite rules file to use dh sequencer.
---
 debian/changelog |   1 +
 debian/rules     | 101 +++++++++++--------------------------------------------
 2 files changed, 21 insertions(+), 81 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 40ce8df..cd51f93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ postgis (2.3.0+dfsg-3) UNRELEASED; urgency=medium
   * Reorder (build) dependencies.
   * Drop explicit liblwgeom-2.3-0 dependency from -postgis-2.3 package,
     already set via ${shlibs:Depends}.
+  * Rewrite rules file to use dh sequencer.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 08 Oct 2016 19:52:11 +0200
 
diff --git a/debian/rules b/debian/rules
index 5f75ddc..b38b943 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,13 +1,5 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets  by Bill Allombert 2001
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -111,10 +103,16 @@ COMMON_CONFIGURE_ARGS = --host=$(DEB_HOST_GNU_TYPE) \
 	--without-interrupt-tests \
 	--with-gui
 
-clean: debian/control
-	dh_testdir
-	dh_testroot
+%:
+	dh $@ --with autotools_dev,autoreconf
+
+override_dh_autoreconf:
+	dh_autoreconf autoconf
+
+override_dh_clean:
+	dh_clean build-arch-stamp
 
+override_dh_auto_clean: debian/control
 #	Clean all separate build directories.
 	(set -e; \
 	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
@@ -138,19 +136,7 @@ clean: debian/control
 #	Cleanup the temporary environment file.
 	rm -f postgis-check-env.tmp
 
-	dh_autotools-dev_restoreconfig
-	dh_autoreconf_clean
-	dh_clean
-
-configuration: configuration-stamp
-configuration-stamp:
-	dh_testdir
-	dh_prep -s
-
-#	Run autoreconf *before* coying sources around.
-	dh_autoreconf autoconf
-	dh_autotools-dev_updateconfig
-
+override_dh_auto_configure:
 #	Copy sources required to build extensions for all but the most
 #	recent Postgres version. Unfortunately, Postgis doesn't support
 #	vpath builds.
@@ -176,12 +162,8 @@ configuration-stamp:
 			--with-pgconfig=/usr/lib/postgresql/$$PGVER/bin/pg_config; \
 	done)
 
-	touch $@
-
-build: build-arch build-indep
-
-build-arch: build-arch-stamp check
-build-arch-stamp: configuration-stamp
+override_dh_auto_build-arch: build-arch-stamp
+build-arch-stamp:
 #	Build against the newest Postgres version
 	$(MAKE)
 	$(MAKE) -C doc
@@ -194,8 +176,7 @@ build-arch-stamp: configuration-stamp
 
 	touch $@
 
-build-indep: build-indep-stamp
-build-indep-stamp: configuration-stamp build-arch-stamp
+override_dh_auto_build-indep: build-arch-stamp
 #	Let PostGIS create a perl script from postgis_restore.pl.in
 	$(MAKE) -C utils
 
@@ -209,9 +190,7 @@ build-indep-stamp: configuration-stamp build-arch-stamp
 #	clever enough to run this before 'install'.
 	$(MAKE) -C extensions
 
-	touch $@
-
-check: build-arch-stamp
+override_dh_auto_test:
 #   Run unit tests (against the newest Postgres version, first)
 	echo "LD_PRELOAD = '$(CURDIR)/liblwgeom/.libs/liblwgeom-$(MAJOR_VERSION).$(MINOR_VERSION).so.$(LIBLWGEOM_SOVERSION)'" \
 		> $(CURDIR)/postgis-check-env.tmp
@@ -244,14 +223,7 @@ check: build-arch-stamp
 		exit 2) \
 	done)
 
-install: install-indep install-arch
-
-install-indep: build-indep
-	dh_testdir
-	dh_testroot
-	dh_prep -i 
-	dh_installdirs -i
-
+override_dh_auto_install-indep:
 #	Install the most recent Postgres version. Note that we used to
 #	install only utils and extensions. However, there are sql scripts
 #	in postgis, raster and topology as well, which need to be
@@ -270,6 +242,7 @@ install-indep: build-indep
 			DESTDIR=$(CURDIR)/debian/tmp \
 			PGSQL_DOCDIR=/usr/share/doc
 
+override_dh_install-indep:
 	dh_install -i
 
 #	Set executable bit for postgis_restore.pl
@@ -287,12 +260,7 @@ install-indep: build-indep
 	rm -rf debian/postgresql-*-postgis-*-scripts/usr/share/postgresql/*/applications
 	rm -rf debian/postgresql-*-postgis-*-scripts/usr/share/postgresql/*/icons
 
-install-arch: build-arch
-	dh_testdir
-	dh_testroot
-	dh_prep -s
-	dh_installdirs -s
-
+override_dh_auto_install-arch:
 #	Install the extension for the most recent Postgres verison
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
@@ -337,42 +305,13 @@ install-arch: build-arch
 	mv $(CURDIR)/debian/tmp/usr/share/postgresql/$(NEWEST_POSTGRES_VERSION)/icons \
 		$(CURDIR)/debian/postgis-gui/usr/share/
 
+override_dh_install-arch:
 	dh_install -s
 
-binary: binary-arch binary-indep
-
-# Build architecture independant packages using the common target.
-binary-indep: install-indep
-	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-binary-arch: install-arch
-	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
-
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-indep
-# in another 'make' thread.
-binary-common:
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdebconf
-	dh_installdocs
-	dh_installexamples
-	dh_installman
-	dh_link
-	dh_lintian
-	dh_strip
-	dh_compress
-	dh_fixperms
+override_dh_makeshlibs:
 	dh_makeshlibs -Xusr/lib/postgis -- -v$(UPSTREAM_VERSION)
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
 
 get-orig-source:
 	uscan --verbose --force-download
 
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch check debian/control
+.PHONY: debian/control

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/postgis.git



More information about the Pkg-grass-devel mailing list