[petsc] 01/02: only manipulate header docs when the doc package is being built

Drew Parsons dparsons at moszumanska.debian.org
Mon Nov 28 14:20:38 UTC 2016


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

dparsons pushed a commit to tag debian/3.7.4+dfsg1-6
in repository petsc.

commit 929527109bc7ddd23d74d2fbdae6eaa3b003eb45
Author: Drew Parsons <dparsons at debian.org>
Date:   Mon Nov 28 21:04:49 2016 +0800

    only manipulate header docs when the doc package is being built
    
    so test if header docs were installed (in a binary-only build they
    won't be)
---
 debian/changelog |  7 +++++++
 debian/rules     | 21 ++++++++++++---------
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6d9a107..ee9b16d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+petsc (3.7.4+dfsg1-6) UNRELEASED; urgency=medium
+
+  * debian/rules: only manipulate header docs when the doc package is
+    being built.
+
+ -- Drew Parsons <dparsons at debian.org>  Mon, 28 Nov 2016 21:03:13 +0800
+
 petsc (3.7.4+dfsg1-5) unstable; urgency=medium
 
   * Update build-ssl1.1.patch to upstream patch ecd1d7b.
diff --git a/debian/rules b/debian/rules
index a9b999d..d356aff 100755
--- a/debian/rules
+++ b/debian/rules
@@ -263,15 +263,18 @@ override_dh_installdocs:
 	dh_installdocs
 	# dh_install can't install .html while preserving directory structure
 	# so first install all include files to docs...
-	dh_install --verbose -p$(PETSC_DOC_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR)  $(PETSC_DIR_DEBUG_PREFIX)/include usr/share/doc/$(PETSC_DOC_PACKAGE)
-	# then remove non-html files
-	find ./debian/$(PETSC_DOC_PACKAGE)/usr/share/doc/$(PETSC_DOC_PACKAGE)/include/ -type f -not -name "*.html" -delete
-	# make header docs "generic" (pointing to headers in preferred alternative in /usr/include/petsc)
-	for hdoc in `find ./debian/$(PETSC_DOC_PACKAGE)/usr/share/doc/$(PETSC_DOC_PACKAGE)/include/ -name "*.html"`; do  \
-	  h=`echo $${hdoc} | xargs basename | sed "s/.html//"`; \
-	  hdir=`echo $${hdoc} | xargs dirname | sed "s|^.*include||"`; \
-	  sed "s|href=\"$${h}\"|href=\"/usr/include/petsc$${hdir}/$${h}\"|" -i $${hdoc};  \
-	done
+	dh_install -p$(PETSC_DOC_PACKAGE) --sourcedir $(PACKAGE_DEBUG_INSTALL_BASEDIR)  $(PETSC_DIR_DEBUG_PREFIX)/include usr/share/doc/$(PETSC_DOC_PACKAGE)
+	# test if header docs were installed (in a binary-only build they won't be)
+	if [ -d ./debian/$(PETSC_DOC_PACKAGE)/usr/share/doc/$(PETSC_DOC_PACKAGE)/include ]; then  \
+	# then remove non-html files  \
+	  find ./debian/$(PETSC_DOC_PACKAGE)/usr/share/doc/$(PETSC_DOC_PACKAGE)/include/ -type f -not -name "*.html" -delete ;  \
+	# make header docs "generic" (pointing to headers in preferred alternative /usr/include/petsc)  \
+	  for hdoc in `find ./debian/$(PETSC_DOC_PACKAGE)/usr/share/doc/$(PETSC_DOC_PACKAGE)/include/ -name "*.html"`; do  \
+	    h=`echo $${hdoc} | xargs basename | sed "s/.html//"`; \
+	    hdir=`echo $${hdoc} | xargs dirname | sed "s|^.*include||"`; \
+	    sed "s|href=\"$${h}\"|href=\"/usr/include/petsc$${hdir}/$${h}\"|" -i $${hdoc};  \
+	  done  \
+	fi
 
 # dh_installchangelogs can't handle a directory of changelog files, so skip them here
 override_dh_installchangelogs:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/petsc.git



More information about the debian-science-commits mailing list