[med-svn] [subread] 01/01: d/filter.pl: additional filter for help2man d/rules: try to generate a man page on the fly d/control: add help2pam to Build-Depends

Alex Mestiashvili malex-guest at moszumanska.debian.org
Sat Mar 14 13:22:36 UTC 2015


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

malex-guest pushed a commit to branch master
in repository subread.

commit 7fa31d09a3c6aceb9260cf45aa920dc178cb9ef3
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Sat Mar 14 13:46:46 2015 +0100

    d/filter.pl: additional filter for help2man
    d/rules: try to generate a man page on the fly
    d/control: add help2pam to Build-Depends
---
 debian/control   |  3 ++-
 debian/filter.pl | 25 +++++++++++++++++++++++++
 debian/rules     | 12 ++++++++++--
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index a82ff3f..4c4f632 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Section: science
 Testsuite: autopkgtest
 Priority: optional
 Build-Depends: debhelper (>= 9),
-               zlib1g-dev
+               zlib1g-dev,
+               help2man
 Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/subread.git
 Vcs-Git: git://anonscm.debian.org/debian-med/subread.git
diff --git a/debian/filter.pl b/debian/filter.pl
new file mode 100755
index 0000000..312360d
--- /dev/null
+++ b/debian/filter.pl
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+# filter of help2man output
+use strict;
+use warnings;
+use Dpkg::Changelog::Parse;
+
+# parse changelog for version
+my $version;
+my %opt;
+$opt{file} = "debian/changelog";
+my @fields = changelog_parse(%opt);
+foreach my $f (@fields) {
+        $version = $f->{Version} if exists $f->{Version};
+	print "VERSION = $version\n";
+}
+
+while ( <STDIN> ) {
+
+        #multiline regex
+        undef $/;
+        $_ =~ s/([\w\d]*)\:\sunrecognized\soption\s\'--version\'/$1 $version/g;
+        $_ =~ s/\.SH\sDESCRIPTION.*Usage:/.SH USAGE:/gmxs;
+
+        print $_;
+}
diff --git a/debian/rules b/debian/rules
index 468332f..ccf8e6a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,9 @@ include /usr/share/dpkg/default.mk
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export EXTRA_FLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+pkg := $(shell dpkg-parsechangelog --show-field=Source)
+mandir := $(CURDIR)/debian/$(pkg)/usr/share/man/man1/
+
 
 %:
 	dh $@
@@ -17,9 +20,16 @@ override_dh_auto_build:
 	cd src; make -f Makefile.Linux
 	dh_auto_build
 
+override_dh_auto_test:
+	debian/tests/subread-tests $(CURDIR)
+
+HELP2MAN = help2man --no-info --help-option="''" --no-discard-stderr
+
 override_dh_auto_install:
 #fix for gzip-file-is-not-multi-arch-same-safe
 	find $(CURDIR) -name "*.gz" -exec bash -c 'name="{}"; gzip -d "{}"; gzip -n "$${name%.*}"' \;
+	mkdir -p $(mandir)
+	$(HELP2MAN) --name='exactSNP' $(CURDIR)/bin/exactSNP | debian/filter.pl > $(mandir)/exactSNP.1
 	dh_auto_install
 
 override_dh_installexamples:
@@ -29,8 +39,6 @@ override_dh_compress:
 # do not compress pdfs
 	dh_compress -X.pdf -Xtest.tar.xz
 
-override_dh_auto_test:
-	debian/tests/subread-tests $(CURDIR)
 
 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/subread.git



More information about the debian-med-commit mailing list