[hdf5] 05/22: Migrate debian/rules to dh

Gilles Filippini pini at debian.org
Fri Apr 22 13:48:42 UTC 2016


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

pini pushed a commit to branch master-1.10
in repository hdf5.

commit a489685497abdfedff554d052f42d091200af252
Author: Gilles Filippini <pini at debian.org>
Date:   Sun Apr 17 23:33:19 2016 +0200

    Migrate debian/rules to dh
---
 debian/changelog |   4 +
 debian/compat    |   2 +-
 debian/rules     | 485 ++++++++++++++++++++++---------------------------------
 3 files changed, 194 insertions(+), 297 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7c7ccaa..d408a85 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 hdf5 (1.10.0+docs-1~exp2) UNRELEASED; urgency=medium
 
+  * debian/rules:
+    - Migrate to dh with compat=10
+    - Drop flag OMPI_MCA_disable_memory_allocator (old workaround for
+      bug #531522)
   * Drop *-dbg packages superseded by automatic debug
     packages
 
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/rules b/debian/rules
index 88a4792..0ad4960 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,16 +7,19 @@
 # (c) 2010-2013 Sylvestre Ledru
 # (c) 2014-2016 Gilles Filippini
 
+# Using dh (debhelper command sequencer) with compat=10
+# Automagically supports:
+# * parallel build
+# * dpkg-buildflags
+
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
 
 package = libhdf5
 pkgversion ?= $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
 libversion ?= $(shell echo $(pkgversion) | sed 's/^\([0-9\.]*\)\(~[^~+]*\)\?\(+docs[0-9]*\)\?-[^-]*$$/\1/')
 
-# Get sonames from config/lt_vers.am
+# BEGIN - Get sonames from config/lt_vers.am
 include config/lt_vers.am
 INTERFACES := @ _CXX _F _HL _HL_CXX _HL_F _TOOLS
 istr = $(subst @,,$(interface))
@@ -28,27 +31,24 @@ $(foreach interface,$(INTERFACES),$(eval \
 $(foreach interface,$(INTERFACES),$(eval \
   SONAME$(istr) := $(shell soname=$(SONAME$(istr)); echo $${soname:-$(SONAME)})))
 
-# Informative target
-info: VARIABLES := package pkgversion libversion $(foreach interface,$(INTERFACES),SONAME$(istr))
-info:
-	@echo $(VARIABLES)
-	@$(foreach var,$(VARIABLES), echo "$(shell printf "%30s" "$(var)") = $($(var))" &&) true
-
 # Targets used by helper script debian/make-version-scripts
 SONAM%: interface = $(subst SONAME,,$@)
 SONAM%:
 	@echo $(SONAME$(istr))
+# END - Get sonames from config/lt_vers.am
 
 serpack = $(package)-$(SONAME)
 sercpppack = $(package)-cpp-$(SONAME_CXX)
 openmpipack = $(package)-openmpi-$(SONAME)
 mpichpack = $(package)-mpich-$(SONAME)
 
+# Crossbuild and multiarch variables
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+# Get default MPI implementation name
 ifneq (,$(wildcard /usr/share/mpi-default-dev/debian_defaults))
 include /usr/share/mpi-default-dev/debian_defaults 
 endif
@@ -58,185 +58,205 @@ DEFAULT_MPI=$(ARCH_DEFAULT_MPI_IMPL)
 # Setting empty OMPIARCHS and MPICHARCHS environment variables disables
 # the related mpi targets
 #
-ARCH_FLAG=-a
 # openmpi broken on archs hppa m68k sh4 (2016-02-24)
 OMPIARCHS?=any !hppa !m68k !sh4
 MPICHARCHS?=any
 
+# BEGIN - Construct the FLAVORS list for current arch
+FLAVORS := serial
+
+ARCHS_openmpi := $(OMPIARCHS)
+ARCHS_mpich := $(MPICHARCHS)
+
+define CHECK_FLAVOR
 # To build for $arch there must be either "any" or "$arch" and no "!$arch"
-ifneq (,$(and $(if $(filter !$(DEB_HOST_ARCH),$(OMPIARCHS)),,yes),$(or $(filter any,$(OMPIARCHS)),$(filter $(DEB_HOST_ARCH),$(OMPIARCHS)))))
-build_openmpi = yes
-else
-build_openmpi = no
-# Exclude binary openmpi packages from the build. See debhelper manpage.
+$(eval flavor_$(1) = $(and $(or $(filter any,$(ARCHS_$(1))),$(filter $(DEB_HOST_ARCH),$(ARCHS_$(1)))),$(if $(filter !$(DEB_HOST_ARCH),$(ARCHS_$(1))),,$(1))))
+FLAVORS += $(flavor_$(1))
+# If not selected, exclude this arch's binary packages from the build.
+# See debhelper manpage.
 # This is in case an arch is disabled with "!$arch". These strings can't
 # appear in debian/control, but the build have to be disabled anyway for
 # the related archs.
-export DH_OPTIONS += -N$(openmpipack) -Nlibhdf5-openmpi-dev
-endif
-
-ifneq (,$(and $(if $(filter !$(DEB_HOST_ARCH),$(MPICHARCHS)),,yes),$(or $(filter any,$(MPICHARCHS)),$(filter $(DEB_HOST_ARCH),$(MPICHARCHS)))))
-build_mpich = yes
-else
-build_mpich = no
-# See above comment for build_openmpi
-export DH_OPTIONS += -N$(mpichpack) -Nlibhdf5-mpich-dev
-endif
-
-ifeq ($(build_openmpi),yes)
-configure_stamp_openmpi = configure-stamp-openmpi
-build_stamp_openmpi = build-stamp-openmpi
-install_openmpi = install-openmpi
-else
-configure_stamp_openmpi =
-build_stamp_openmpi =
-install_openmpi =
-endif
-
-ifeq ($(build_mpich),yes)
-configure_stamp_mpich = configure-stamp-mpich
-build_stamp_mpich = build-stamp-mpich
-install_mpich = install-mpich
-else
-configure_stamp_mpich =
-build_stamp_mpich =
-install_mpich =
-endif
+$(if $(flavor_$(1)),,export DH_OPTIONS += -N$($(1)pack) -Nlibhdf5-$(1)-dev)
+endef
+$(foreach mpi,openmpi mpich,$(eval $(call CHECK_FLAVOR,$(mpi))))
+# END - Construct the FLAVORS list
 
 # Don't build doc on archs where php5-cli is not available:
 NODOCARCHS ?= !m68k !sh4
 ifeq (,$(filter !$(DEB_HOST_ARCH),$(NODOCARCHS)))
-build_stamp_doc = build-stamp-doc
-install_doc = install-doc
+install_doc = yes
 else
-build_stamp_doc =
-install_doc =
+install_doc = no
 export DH_OPTIONS += -Nlibhdf5-doc
 endif
 
+# BEGIN - Configure flags and environment variables
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        USE_PROD = production
 else
        USE_PROD = debug
 endif
 
-# export DEB_BUILD_OPTIONS="parallel=2"
-#
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-	MAKEFLAGS += -j$(NUMJOBS)
-endif	
-
 CONFIGURE_FLAGS = --prefix=/usr --host=$(DEB_HOST_GNU_TYPE) \
 		  --build=$(DEB_BUILD_GNU_TYPE) \
+		  --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 		  --mandir=\$${prefix}/share/man \
 		  --with-pthread --enable-linux-lfs --enable-unsupported \
 		  --enable-shared --enable-build-mode=$(USE_PROD) \
 		  --disable-sharedlib-rpath --with-zlib --with-default-api-version=v18 \
 		  --with-szlib \
 		  --enable-fortran --enable-fortran2003
-SERIAL_FLAGS = --enable-threadsafe --enable-cxx --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --includedir=\$${prefix}/include/hdf5/serial --with-flavor=serial
-OPENMPI_FLAGS = --enable-parallel=yes --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --includedir=\$${prefix}/include/hdf5/openmpi --with-flavor=openmpi
-MPICH_FLAGS = --enable-parallel=yes --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --includedir=\$${prefix}/include/hdf5/mpich --with-flavor=mpich
-
-configure: configure-stamp-debian configure-stamp \
-	   $(configure_stamp_openmpi) $(configure_stamp_mpich)
-
-configure-stamp-debian: debian/control.in
-	# This loop generates helper files from debian/*.*.in templates
-	cd debian && for file in *.*.in; do \
-	  for flavor in serial openmpi mpich; do \
-	    helper=`basename $$file .in | sed 's/soname_cxx/$(SONAME_CXX)/g;s/soname/$(SONAME)/g'` ; \
-	    flavorpkgstr="" ; \
-	    flavorlibstr="" ; \
-	    ifmpi="#"; \
-	    ifserial=""; \
-	    if [ "$$flavor" != "serial" ]; then \
-	      if echo "$$helper" | grep -Eq '\-cpp'; then \
-	        continue ; \
-	      fi ; \
-	      flavorpkgstr="-$$flavor" ; \
-	      ifmpi="" ; \
-	      ifserial="#"; \
-	    fi ; \
-	    flavorlibstr="_$$flavor" ; \
-	    helper=`echo $$helper | sed 's/-flavor/'$$flavorpkgstr'/'` ; \
-	    sed -e 's/@FLAVORLIB@/'$$flavorlibstr'/g' \
-		-e 's/@FLAVORPKG@/'$$flavorpkgstr'/g' \
-		-e 's/@FLAVOR@/'$$flavor'/g' \
-                -e 's/@IFMPI@/'$$ifmpi'/g' \
-                -e 's/@IFSERIAL@/'$$ifserial'/g' \
-                -e 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
-                -e 's/@SONAME_CXX@/$(SONAME_CXX)/g' \
-                -e 's/@SONAME@/$(SONAME)/g' \
-	      $$file >$$helper ; \
-	    done ; \
-	  done
-	#
-	mkdir -p m4
-	dh_autoreconf
-	touch $@
-
-configure-stamp: configure-stamp-debian
-	dh_testdir
-	-mkdir debian/build
-# configure serial flavor
-	cd debian/build && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" CC=/usr/bin/cc CXX=/usr/bin/c++ FC=gfortran \
-		H5_LDFLAGS="-Wl,--version-script,\$$(top_srcdir)/debian/map_serial.ver" \
-		../../configure $(CONFIGURE_FLAGS) $(SERIAL_FLAGS) || { cat config.log; exit 1; }
-	touch $@
-
-configure-stamp-openmpi: configure-stamp-debian
-	dh_testdir
-	-mkdir debian/build-openmpi
-# configure openmpi flavor
-	cd debian/build-openmpi && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" \
-		H5_LDFLAGS="-Wl,--version-script,\$$(top_srcdir)/debian/map_mpi.ver" \
-		CC=mpicc.openmpi FC=mpif90.openmpi F9X=mpif90.openmpi RUNPARALLEL=/usr/bin/mpirun.openmpi \
-		OMPI_MCA_disable_memory_allocator=1 ../../configure $(CONFIGURE_FLAGS) $(OPENMPI_FLAGS) \
-		|| { cat config.log; exit 1; }
-	ln debian/man/h5pcc.1 debian/man/h5pcc.openmpi.1
-	ln debian/man/h5pfc.1 debian/man/h5pfc.openmpi.1
-	touch $@
-
-configure-stamp-mpich: configure-stamp-debian
-	dh_testdir
-	-mkdir debian/build-mpich
-# configure mpich flavor
-	cd debian/build-mpich && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" \
-		H5_LDFLAGS="-Wl,--version-script,\$$(top_srcdir)/debian/map_mpi.ver" \
-		CC=mpicc.mpich \
-		CXX=mpicxx.mpich FC=mpif90.mpich F9X=mpif90.mpich RUNPARALLEL=/usr/bin/mpirun.mpich \
-		../../configure $(CONFIGURE_FLAGS) $(MPICH_FLAGS) \
-		|| { cat config.log; exit 1; }
-	ln debian/man/h5pcc.1 debian/man/h5pcc.mpich.1
-	ln debian/man/h5pfc.1 debian/man/h5pfc.mpich.1
-	touch $@
-
-prep: 
-	dh_prep
-
-
-build: build-arch build-indep
-build-arch: build-stamp $(build_stamp_openmpi) $(build_stamp_mpich)
-build-indep: $(build_stamp_doc)
-
-build-stamp: configure-stamp
-	dh_testdir
-	$(MAKE) $(MAKEFLAGS) -C debian/build/
-	touch $@
-
-build-stamp-openmpi: configure-stamp-openmpi 
-	dh_testdir
-	$(MAKE)  $(MAKEFLAGS) -C debian/build-openmpi/ OMPI_MCA_disable_memory_allocator=1
-	touch $@
-
-build-stamp-mpich: configure-stamp-mpich 
-	dh_testdir
-	$(MAKE)  $(MAKEFLAGS) -C debian/build-mpich/
-	touch $@
-
-build-stamp-doc: configure-stamp
+FLAVOR_FLAGS = --includedir=\$${prefix}/include/hdf5/$(1) --with-flavor=$(1)
+SERIAL_FLAGS = $(call FLAVOR_FLAGS,serial) --enable-threadsafe --enable-cxx
+OPENMPI_FLAGS = $(call FLAVOR_FLAGS,openmpi) --enable-parallel=yes
+MPICH_FLAGS = $(call FLAVOR_FLAGS,mpich) --enable-parallel=yes
+
+SERIAL_ENV := H5_LDFLAGS="-Wl,--version-script,\$$(top_srcdir)/debian/map_serial.ver"
+MPI_ENV = H5_LDFLAGS="-Wl,--version-script,\$$(top_srcdir)/debian/map_mpi.ver" \
+	CC=mpicc.$(1) FC=mpif90.$(1) F9X=mpif90.$(1) RUNPARALLEL=/usr/bin/mpirun.$(1)
+OPENMPI_ENV := $(call MPI_ENV,openmpi)
+MPICH_ENV := $(call MPI_ENV,mpich)
+# END - Configure flags and environment variables
+
+# Compose the packages' name flavor part from $(flavor)
+flavorpkg = $(subst -serial,,-$(flavor))
+
+# Generate helper files list from debian/*.in
+DEBIAN_OUT := $(shell \
+  ls -1 debian/*.in | \
+  awk '\
+    BEGIN {$(foreach flavor,$(FLAVORS),flavor["$(flavor)"]="$(flavorpkg)";)} \
+    { \
+      gsub(".in$$","",$$0); \
+      gsub("soname_cxx","$(SONAME_CXX)",$$0); \
+      gsub("soname","$(SONAME)",$$0); \
+      gsub("-flavor-cpp","-cpp",$$0); \
+    } \
+    /-flavor/{helpers=""; for (f in flavor) {helper=$$0; gsub("-flavor",flavor[f],helper); helpers=helpers" "helper}; $$0=helpers} \
+    !/control/ {print $$0} \
+  ' \
+)
+# Requested to prevent deletion of $(DEBIAN_OUT) files as intermediate files
+.SECONDARY: $(DEBIAN_OUT)
+
+
+# Informative target
+info: VARIABLES := package pkgversion libversion $(foreach interface,$(INTERFACES),SONAME$(istr))
+info: VARIABLES += FLAVORS DH_OPTIONS DEBIAN_OUT
+info:
+	@$(foreach var,$(VARIABLES), echo "$(shell printf "%30s" "$(var)") = $($(var))" &&) true
+
+
+# These snippets generate every needed helper file from their respective
+# template
+debian/%: debian/%.in
+	sed -e 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
+	    -e 's/@SONAME_CXX@/$(SONAME_CXX)/g' \
+	    -e 's/@SONAME@/$(SONAME)/g' \
+	    -e "s/@OMPIARCHS@/$(filter-out !%,$(OMPIARCHS))/" \
+	    -e "s/@MPICHARCHS@/$(filter-out !%,$(MPICHARCHS))/" \
+	    -e "s/@NODOCARCHS@/$(NODOCARCHS)/g" \
+	  $< >$@
+
+libhdf5-flavor-cpp-$(SONAME_CXX)%: libhdf5-flavor-cpp-soname_cxx%
+	ln -s $$(basename $<) $@
+
+libhdf5-flavor-$(SONAME)%: libhdf5-flavor-soname%
+	ln -s $$(basename $<) $@
+
+define helper_flavor_rule
+debian/libhdf5$(2)-%: flavor = $(1)
+debian/libhdf5$(2)-%: ifmpi = $(if $(findstring mpi,$(1)),,\#)
+debian/libhdf5$(2)-%: ifserial = $(if $(findstring mpi,$(1)),\#,)
+debian/libhdf5$(2)-%: debian/libhdf5-flavor-%
+	sed -e 's/@FLAVORLIB@/'_$$(flavor)'/g' \
+	    -e 's/@FLAVORPKG@/'$$(flavorpkg)'/g' \
+	    -e 's/@FLAVOR@/'$$(flavor)'/g' \
+	    -e 's/@IFMPI@/'$$(ifmpi)'/g' \
+	    -e 's/@IFSERIAL@/'$$(ifserial)'/g' \
+	  $$< >$$@
+endef
+$(foreach flavor,$(FLAVORS),$(eval $(call helper_flavor_rule,$(flavor),$(flavorpkg))))
+
+# End of helpar files generation snippets
+
+
+%:
+	dh $@
+
+override_dh_auto_clean: debian/control
+	rm -fr $(DEBIAN_OUT)
+	rm -fr debian/build-*
+	rm -f debian/man/h5p[cf]c.*.1
+	rm -f c++/src/cpp_doc_config_u
+	rm -fr html/cpplus_RM
+
+override_dh_clean:
+	dh_clean -Xh5ex_g_iterate.orig
+
+configure_%: flavor = $(patsubst configure_%,%,$@)
+configure_%: FLAVOR = $(shell echo $(flavor) | tr '[:lower:]' '[:upper:]')
+configure_%: flavor_map = $(or $(findstring mpi,$(flavor)),serial)
+configure_%: builddir = debian/build-$(flavor)
+configure_%: $(DEBIAN_OUT)
+	$($(FLAVOR)_ENV) dh_auto_configure --builddirectory=$(builddir) -- $(CONFIGURE_FLAGS) $($(FLAVOR)_FLAGS)
+	$(if $(findstring mpi,$(flavor)),$(link_h5p_manpages),)
+define link_h5p_manpages
+	ln debian/man/h5pcc.1 debian/man/h5pcc.$(flavor).1
+	ln debian/man/h5pfc.1 debian/man/h5pfc.$(flavor).1
+endef
+
+override_dh_auto_configure: $(foreach flavor,$(FLAVORS),configure_$(flavor))
+	echo "hdf5-mpi-dev=libhdf5-$(DEFAULT_MPI)-dev" > debian/libhdf5-mpi-dev.substvars
+
+build_%: flavor = $(patsubst build_%,%,$@)
+build_%: builddir = debian/build-$(flavor)
+build_%:
+	dh_auto_build --builddirectory=$(builddir)
+
+override_dh_auto_build-arch: $(foreach flavor,$(FLAVORS),build_$(flavor))
+
+override_dh_auto_test:
+
+install_%: flavor = $(patsubst install_%,%,$@)
+install_%: builddir = debian/build-$(flavor)
+install_%: destdir = $(builddir)/tmpinst
+install_%:
+	dh_auto_install --builddirectory=$(builddir) --destdir=$(destdir)
+	chrpath -d $(destdir)/usr/lib/*/libhdf5*so*
+
+override_dh_auto_install-arch: $(foreach flavor,$(FLAVORS),install_$(flavor))
+
+PACKAGES_serial := $(serpack) $(package)-dev hdf5-helpers hdf5-tools $(sercpppack)
+PACKAGES_openmpi := $(openmpipack) $(package)-openmpi-dev
+PACKAGES_mpich := $(mpichpack) $(package)-mpich-dev
+
+dh_install_%: flavor = $(patsubst dh_install_%,%,$@)
+dh_install_%: builddir = debian/build-$(flavor)
+dh_install_%: destdir = $(builddir)/tmpinst
+dh_install_%: devpkg = $(package)$(flavorpkg)-dev
+dh_install_%:
+	dh_install $(foreach pkg,$(PACKAGES_$(flavor)),-p$(pkg)) --sourcedir=$(destdir)
+	install -d debian/$(devpkg)/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
+	sed 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/hdf5-$(flavor).pc >debian/$(devpkg)/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/hdf5-$(flavor).pc
+	$(if $(findstring mpi,$(flavor)),$(rename_h5p_helpers),)
+define rename_h5p_helpers
+	cd debian/$(devpkg)/usr/bin && \
+	  $(foreach lang,c f, \
+	    mv h5p$(lang)c h5p$(lang)c.$(flavor) && \
+	  ) : 
+endef
+
+override_dh_install: $(foreach flavor,$(FLAVORS),dh_install_$(flavor))
+	find debian/$(serpack)/usr/lib -name '*cpp*' -delete
+
+override_dh_makeshlibs:
+	dh_makeshlibs -- -v$(libversion)
+
+
+ifeq (yes,$(install_doc))
+build_doc:
 	echo "builddeps:Built-Using=doxygen (= $$(dpkg-query -W -f='$${source:Version}' doxygen))" >>debian/libhdf5-doc.substvars
 	# Upgrade the doxygen configuration file
 	cp c++/src/cpp_doc_config c++/src/cpp_doc_config_u
@@ -245,151 +265,24 @@ build-stamp-doc: configure-stamp
 	cd c++/src && doxygen cpp_doc_config_u >/dev/null
 	rm -rf html/cpplus_RM
 	mv c++/src/cpplus_RM html/cpplus_RM
-	touch $@
 
-#
-# Be sure to not have a previous release installed before running
-# the test suite
-#
-test: build-stamp
-	$(MAKE) -C debian/build/ test
-
-clean:
-	test -f debian/control.in
-	-rm -rf debian/build
-	-rm -rf debian/build-openmpi
-	-rm -rf debian/build-mpich
-	grep -v ^\% debian/control.in | sed \
-	  -e "s/@SONAME@/$(SONAME)/g" \
-	  -e "s/@SONAME_CXX@/$(SONAME_CXX)/g" \
-	  -e "s/@OMPIARCHS@/$(filter-out !%,$(OMPIARCHS))/" \
-	  -e "s/@MPICHARCHS@/$(filter-out !%,$(MPICHARCHS))/" \
-	  -e "s/@NODOCARCHS@/$(NODOCARCHS)/g" \
-	  > debian/control
-	dh_autoreconf_clean
-	rm -f m4/l*
-	-cd debian && rm -f `ls libhdf5-*.install libhdf5-*.shlibs libhdf5-*.doc | grep -v 'libhdf5-doc'`
-	-rm -rf c++/src/HTML
-	-rm -rf html/cpplus_RM
-	-rm -f c++/src/cpp_doc_config_u*
-	-rm -f debian/man/h5pcc.*.1
-	-rm -f debian/man/h5pfc.*.1
-	dh_clean -Xh5ex_g_iterate.orig configure-stamp* build-stamp* install-stamp*
-
-install: build prep install-serial $(install_openmpi) $(install_mpich) $(install_doc)
-
-install-serial: build-stamp
-	dh_testdir
-	dh_testroot
-	-mkdir debian/build/tmpinst
-	$(MAKE) -C debian/build/ install prefix=$(CURDIR)/debian/build/tmpinst/usr
-	chrpath -d $(CURDIR)/debian/build/tmpinst/usr/lib/*/libhdf5*so*
-	dh_install -p$(serpack) -p$(package)-dev -phdf5-helpers -phdf5-tools -p$(sercpppack) \
-		--sourcedir=debian/build/tmpinst
-	find debian/$(serpack)/usr/lib -name '*cpp*' -delete
-	install -d debian/$(package)-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
-	sed 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/hdf5-serial.pc >debian/$(package)-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/hdf5-serial.pc
-
-install-openmpi: build-stamp-openmpi
-	dh_testdir
-	dh_testroot
-	-mkdir debian/build-openmpi/tmpinst
-	$(MAKE) -C debian/build-openmpi/ install prefix=$(CURDIR)/debian/build-openmpi/tmpinst/usr
-	chrpath -d $(CURDIR)/debian/build-openmpi/tmpinst/usr/lib/*/libhdf5*so*
-	dh_install -p$(openmpipack) -p$(package)-openmpi-dev \
-		--sourcedir=debian/build-openmpi/tmpinst
-	install -d debian/$(package)-openmpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
-	sed 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/hdf5-openmpi.pc >debian/$(package)-openmpi-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/hdf5-openmpi.pc
-	cd debian/$(package)-openmpi-dev/usr/bin && \
-		mv h5pcc h5pcc.openmpi && \
-		mv h5pfc h5pfc.openmpi
-
-install-mpich: build-stamp-mpich
-	dh_testdir
-	dh_testroot
-	-mkdir debian/build-mpich/tmpinst
-	$(MAKE) -C debian/build-mpich/ install prefix=$(CURDIR)/debian/build-mpich/tmpinst/usr
-	chrpath -d $(CURDIR)/debian/build-mpich/tmpinst/usr/lib/*/libhdf5*so*
-	dh_install -p$(mpichpack) -p$(package)-mpich-dev \
-		--sourcedir=debian/build-mpich/tmpinst
-	install -d debian/$(package)-mpich-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
-	sed 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' debian/hdf5-mpich.pc >debian/$(package)-mpich-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/hdf5-mpich.pc
-	cd debian/$(package)-mpich-dev/usr/bin && \
-		mv h5pcc h5pcc.mpich && \
-		mv h5pfc h5pfc.mpich
-
-install-doc: HTML_DIR := debian/$(package)-doc/usr/share/doc/$(package)-doc/html
-install-doc: build-indep
-	dh_testdir
-	dh_testroot
+install_doc: HTML_DIR := debian/$(package)-doc/usr/share/doc/$(package)-doc/html
+install_doc:
 	dh_install -p$(package)-doc -X Dependencies -X Makefile.in -X CppUserNotes.doc
 	# process php in html files
 	find "$(HTML_DIR)"/ -type f -iname '*.html' \
 	  -execdir /bin/sh -c "/usr/bin/php -f '{}' > '{}.new'" \; \
 	  -exec mv "{}.new" "{}" \;
 
-binary-indep: $(install_doc)
-	dh_testdir
-	dh_testroot
-	dh_installdocs -i
-	dh_installchangelogs -i -k release_docs/RELEASE.txt
-	dh_link
-	dh_compress -i -X.pdf
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_lintian -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-binary-arch: prep install-serial $(install_openmpi) $(install_mpich)
-	dh_testdir
-	dh_testroot
-	echo "hdf5-mpi-dev=libhdf5-$(DEFAULT_MPI)-dev" > debian/libhdf5-mpi-dev.substvars
-	dh_installdocs $(ARCH_FLAG)
-	dh_installman $(ARCH_FLAG)
-	dh_lintian $(ARCH_FLAG)
-	dh_installchangelogs -a -k release_docs/RELEASE.txt
-	dh_link $(ARCH_FLAG)
-	dh_strip -phdf5-tools
-	dh_strip -phdf5-helpers
-	dh_strip -p$(serpack)
-	dh_strip -p$(sercpppack)
-ifeq ($(build_mpich),yes)
-	dh_strip -p$(mpichpack)
-endif
-ifeq ($(build_openmpi),yes)
-	dh_strip -p$(openmpipack)
-endif
-	dh_compress $(ARCH_FLAG)
-	dh_fixperms $(ARCH_FLAG)
-ifeq ($(build_openmpi),yes)
-	dh_makeshlibs -p$(openmpipack) -V $(openmpipack) -- -v$(libversion)
-endif
-ifeq ($(build_mpich),yes)
-	dh_makeshlibs -p$(mpichpack) -V $(mpichpack) -- -v$(libversion)
-endif
-	dh_makeshlibs -p$(serpack) -V $(serpack) -- -v$(libversion)
-	dh_makeshlibs -p$(sercpppack) -V $(sercpppack) -- -v$(libversion)
-	dh_installdeb $(ARCH_FLAG)
-	dh_shlibdeps -p$(serpack) -L$(serpack) -lusr/lib/$(DEB_HOST_MULTIARCH)
-	dh_shlibdeps -p$(sercpppack) -L$(serpack) -lusr/lib/$(DEB_HOST_MULTIARCH)
-	dh_shlibdeps -phdf5-tools -L$(serpack) -lusr/lib/$(DEB_HOST_MULTIARCH)
-	dh_shlibdeps -phdf5-helpers -L$(serpack) -lusr/lib/$(DEB_HOST_MULTIARCH)
-ifeq ($(build_openmpi),yes)
-	dh_shlibdeps -p$(openmpipack) -L$(openmpipack) -lusr/lib/$(DEB_HOST_MULTIARCH)
-endif
-ifeq ($(build_mpich),yes)
-	dh_shlibdeps -p$(mpichpack) -L$(mpichpack) -lusr/lib/$(DEB_HOST_MULTIARCH)
+override_dh_auto_build-indep: build_doc
+override_dh_auto_install-indep: install_doc
+else
+override_dh_auto_build-indep:
+override_dh_auto_install-indep:
 endif
-	dh_gencontrol $(ARCH_FLAG)
-	dh_md5sums $(ARCH_FLAG)
-	dh_builddeb $(ARCH_FLAG)
-
-binary: binary-indep binary-arch
 
-.PHONY: build clean binary-indep binary-arch binary install configure \
-		install-doc install-serial install-openmpi install-mpich prep
+override_dh_installchangelogs:
+	dh_installchangelogs -k release_docs/RELEASE.txt
 
-.NOTPARALLEL: configure-stamp-debian configure-stamp \
-	   $(configure_stamp_openmpi) $(configure_stamp_mpich)
+override_dh_compress:
+	dh_compress -Xpdf

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



More information about the Pkg-grass-devel mailing list