[h5utils] 27/39: Use minimal dh rules with autoreconf.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 23:56:10 UTC 2015


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

sebastic pushed a commit to branch master
in repository h5utils.

commit f114a328e6729a5f40e224d7253889b300bdbe0c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue Jul 21 23:56:19 2015 +0200

    Use minimal dh rules with autoreconf.
---
 debian/changelog |  1 +
 debian/control   |  1 +
 debian/rules     | 68 +++++++++-----------------------------------------------
 3 files changed, 12 insertions(+), 58 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 48a8a63..33b6cc1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ h5utils (1.12.1-3) UNRELEASED; urgency=medium
   * Reorder build dependencies, change libz-dev to zlib1g-dev.
   * Switch to source format 3.0 (quilt).
   * Update copyright file using copyright-format 1.0.
+  * Use minimal dh rules with autoreconf.
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 21 Jul 2015 23:15:08 +0200
 
diff --git a/debian/control b/debian/control
index 8200fc4..a8a21ca 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
 Section: science
 Priority: optional
 Build-Depends: debhelper (>= 9),
+               dh-autoreconf,
                hdf5-tools,
                libhdf5-dev,
                libhdf4-dev,
diff --git a/debian/rules b/debian/rules
index 9a7dc10..8104d2e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,72 +10,24 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -g
-endif
+DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 # LFS support
-ifeq ($(shell grep '^[[:space:]]*Linux Large File Support (LFS)' /usr/lib/libhdf5.settings | sed 's/^[[:space:]]*Linux Large File Support (LFS):[[:space:]]*//'),yes)
- CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE
- export CPPFLAGS
+ifeq ($(shell grep '^[[:space:]]*Linux Large File Support (LFS)' /usr/lib/*/hdf5/*/libhdf5.settings | sed 's/^[[:space:]]*Linux Large File Support (LFS):[[:space:]]*//'),yes)
+  CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE
 endif
 
 ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
-  export CPPFLAGS += -I/usr/include/hdf5/serial
-  export LDFLAGS += -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
+  CPPFLAGS += -I/usr/include/hdf5/serial
+  LDFLAGS += -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
 endif
 
-configure: config.status
-config.status:
-	dh_testdir
-	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
-		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
-		--with-octave --with-hdf4
-
-build: configure build-stamp
-build-stamp: 
-	dh_testdir
-	$(MAKE)
-	touch $@
+%:
+	dh $@ --with autoreconf --parallel
 
-clean:
-	dh_testdir
-	dh_testroot
-	
-	[ ! -f Makefile ] || $(MAKE) distclean
-	
+override_dh_clean:
 	dh_clean h5read.oct
 
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/h5utils
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-	dh_installman
-	dh_installchangelogs ChangeLog
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+override_dh_auto_configure:
+	dh_auto_configure -- --with-octave --with-hdf4
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install

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



More information about the Pkg-grass-devel mailing list