[med-svn] [iqtree] 01/01: Create manpage on the fly at packaging time using help2man

Andreas Tille tille at debian.org
Tue Sep 1 09:53:40 UTC 2015


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

tille pushed a commit to branch master
in repository iqtree.

commit d5a7685e8ccab232e346ff03a1b7d036a7a6d447
Author: Andreas Tille <tille at debian.org>
Date:   Tue Sep 1 11:53:15 2015 +0200

    Create manpage on the fly at packaging time using help2man
---
 debian/changelog |  1 +
 debian/control   |  3 ++-
 debian/rules     | 21 +++++++++------------
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 44ef052..5b60cb1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ iqtree (1.3.8+dfsg-1) UNRELEASED; urgency=low
   * Initial release (Closes: #<bug>)
   TODO:
    - Move models.nex to /usr/share/iqtree
+   - ask upstream for example.phy
    - Ask upstream about source for Documents/iqtree-manual-1.0.pdf
    - Ask upstream about using Debian packaged sprng
   MAYBE
diff --git a/debian/control b/debian/control
index 200d710..3ba4c8a 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,8 @@ Build-Depends: debhelper (>= 9),
                cmake,
                libeigen3-dev,
                libsprng2-dev,
-               zlib1g-dev
+               zlib1g-dev,
+               help2man
 Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/iqtree.git
 Vcs-Git: git://anonscm.debian.org/debian-med/iqtree.git
diff --git a/debian/rules b/debian/rules
index da40490..f1f2e48 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,18 +2,9 @@
 
 # DH_VERBOSE := 1
 
-# some helpful variables - uncomment them if needed
-# shamelessly stolen from http://jmtd.net/log/awk/
-#DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
-#VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
-#DEBFLAVOR      := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
-#DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-#DEBIAN_BRANCH  := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
-#GIT_TAG        := $(subst ~,_,$(VERSION))
-
-# alternatively to manually set those variables, you can
-#  include /usr/share/dpkg/default.mk
-# and use what is set there.
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+version=$(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
+mandir=$(CURDIR)/debian/$(pkg)/usr/share/man/man1/
 
 %:
 	dh $@
@@ -23,5 +14,11 @@ override_dh_installdocs:
 	# source of upstream doc needes to be obtained first
 	find debian -name iqtree-manual-1.0.pdf -delete
 
+override_dh_installman:
+	mkdir -p $(mandir)
+	help2man --no-info --no-discard-stderr --help-option="-h" \
+	    --name='efficient phylogenetic software by maximum likelihood' \
+	    --version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree > $(mandir)/iqtree.1
+
 get-orig-source:
 	uscan --verbose --force-download --repack --compression xz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/iqtree.git



More information about the debian-med-commit mailing list