[cpp-sp] 23/37: Cut down repetition in manpage installation

Scott Cantor cantor.2 at osu.edu
Thu Dec 20 19:47:49 EST 2018


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

scantor pushed a commit to annotated tag debian/2.5.5+dfsg1-1
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=3d6bc295124081bac051e77b1a4e5310d035cf52

commit 3d6bc295124081bac051e77b1a4e5310d035cf52
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu Jan 21 23:49:23 2016 +0100

    Cut down repetition in manpage installation
---
 debian/man-pages/{mdquery.pod => mdquery.1.pod}    |  0
 .../{resolvertest.pod => resolvertest.1.pod}       |  0
 .../{shib-keygen.pod => shib-keygen.8.pod}         |  0
 .../{shib-metagen.pod => shib-metagen.1.pod}       |  0
 debian/man-pages/{shibd.pod => shibd.8.pod}        |  0
 debian/rules                                       | 31 +++++++++++-----------
 6 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/debian/man-pages/mdquery.pod b/debian/man-pages/mdquery.1.pod
similarity index 100%
rename from debian/man-pages/mdquery.pod
rename to debian/man-pages/mdquery.1.pod
diff --git a/debian/man-pages/resolvertest.pod b/debian/man-pages/resolvertest.1.pod
similarity index 100%
rename from debian/man-pages/resolvertest.pod
rename to debian/man-pages/resolvertest.1.pod
diff --git a/debian/man-pages/shib-keygen.pod b/debian/man-pages/shib-keygen.8.pod
similarity index 100%
rename from debian/man-pages/shib-keygen.pod
rename to debian/man-pages/shib-keygen.8.pod
diff --git a/debian/man-pages/shib-metagen.pod b/debian/man-pages/shib-metagen.1.pod
similarity index 100%
rename from debian/man-pages/shib-metagen.pod
rename to debian/man-pages/shib-metagen.1.pod
diff --git a/debian/man-pages/shibd.pod b/debian/man-pages/shibd.8.pod
similarity index 100%
rename from debian/man-pages/shibd.pod
rename to debian/man-pages/shibd.8.pod
diff --git a/debian/rules b/debian/rules
index 64a820d..36d1c5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ else
     DEBUG =
 endif
 
-# These variables are used by get-orig-source and to generate man pages.
+# These variables are used by get-orig-source
 DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
 		| cut -d- -f1)
 VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
@@ -76,23 +76,18 @@ override_dh_install:
 	mkdir -p debian/tmp/usr/lib/apache2/modules
 	mv debian/tmp/usr/lib/*/shibboleth/mod_shib_24.so \
 	    debian/tmp/usr/lib/apache2/modules/mod_shib2.so
-	pod2man debian/man-pages/mdquery.pod --section 1		\
-	    --center 'Shibboleth' --release $(VERSION)			\
-	    debian/shibboleth-sp2-utils/usr/share/man/man1/mdquery.1
-	pod2man debian/man-pages/resolvertest.pod --section 1		  \
-	    --center 'Shibboleth' --release $(VERSION)			  \
-	    debian/shibboleth-sp2-utils/usr/share/man/man1/resolvertest.1
-	pod2man debian/man-pages/shib-metagen.pod --section 1		  \
-	    --center 'Shibboleth' --release $(VERSION)			  \
-	    debian/shibboleth-sp2-utils/usr/share/man/man1/shib-metagen.1
-	pod2man debian/man-pages/shib-keygen.pod --section 8		 \
-	    --center 'Shibboleth' --release $(VERSION)			 \
-	    debian/shibboleth-sp2-utils/usr/share/man/man8/shib-keygen.8
-	pod2man debian/man-pages/shibd.pod --section 8			\
-	    --center 'Shibboleth' --release $(VERSION)			\
-	    debian/shibboleth-sp2-utils/usr/share/man/man8/shibd.8
 	dh_install -s -i -X mod_shib2.so --fail-missing
 
+UTIL_MANS:=$(patsubst %,debian/%, \
+    mdquery.1 resolvertest.1 shib-metagen.1 shib-keygen.8 shibd.8)
+
+debian/%: debian/man-pages/%.pod
+	pod2man --section '$(subst .,,$(suffix $@))' --center Shibboleth \
+		--release '$(word 3,$(shell ./config.status --version))' $< $@
+
+override_dh_installman: $(UTIL_MANS)
+	dh_installman -p shibboleth-sp2-utils $(UTIL_MANS)
+
 override_dh_installdocs:
 	dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/RELEASE.txt doc/README.txt
 
@@ -105,3 +100,7 @@ override_dh_fixperms:
 
 override_dh_makeshlibs:
 	dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/shibboleth
+
+override_dh_clean:
+	dh_clean
+	rm -f $(UTIL_MANS)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list