[med-svn] [SCM] bowtie2 branch, master, updated. upstream/2.0.6-59-g3df4b1c

Alexandre Mestiashvili alex at biotec.tu-dresden.de
Wed Feb 27 15:56:45 UTC 2013


The following commit has been merged in the master branch:
commit e6c50930c7a7c611e34f1577c7966ffb7e3111e7
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Wed Feb 27 14:22:22 2013 +0100

     - d/help2man-wrapper:  as kindly suggested by Andreas Tille
     as workaround fot #701686 and buggy help2man
     - d/rules: use help2man-wrapper instead of help2man to
     generate man pages

diff --git a/debian/help2man-wrapper b/debian/help2man-wrapper
new file mode 100755
index 0000000..a301c66
--- /dev/null
+++ b/debian/help2man-wrapper
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Very dirty trick to drain information via help2man even if binary outputs to stderr
+
+if [ $# -ne 2 ] ; then
+    echo "Usage: $0 <binary_name> <description>"
+    exit 1
+fi
+
+pkg=`dpkg-parsechangelog | sed -n 's/^Source: //p'`
+version=`dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d-`
+mandir=${PWD}/debian/${pkg}/usr/share/man/man1/
+tmpdir=`mktemp -d`
+
+mkdir -p $tmpdir
+binname=$1
+tmpbin=${tmpdir}/$binname
+echo "#!/bin/sh" > $tmpbin
+echo "cat <<EOT" >> $tmpbin
+${PWD}/debian/${pkg}/usr/bin/$binname 2>> $tmpbin
+chmod 755 $tmpbin
+help2man --no-info --help-option="''" --no-discard-stderr --name="$2" --version-string="${version}" $tmpbin > $mandir/${binname}.1
+rm -rf $tmpdir
diff --git a/debian/rules b/debian/rules
index bbfc29a..5af98be 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,16 +22,12 @@ endif
 override_dh_auto_build:
 	dh_auto_build -- ENABLE_SSE=$(ENABLE_SSE) EXTRA_FLAGS=$(EXTRA_FLAGS) CPPFLAGS=$(CPPFLAGS)
 
-override_dh_auto_install:
+override_dh_installman:
 	mkdir -p $(CURDIR)/debian/$(pkg)/usr/share/man/man1/
-	help2man --name="wrapper for $(pkg)-align" --no-info \
-		$(CURDIR)/$(pkg) > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/$(pkg).1
-	help2man --name="building a colorspace index for $(pkg)" --no-info \
-		$(CURDIR)/$(pkg)-build > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/$(pkg)-build.1
-	help2man --name="extracts information from a $(pkg) index" --no-info \
-		$(CURDIR)/$(pkg)-inspect > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/$(pkg)-inspect.1
-	help2man --name="ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences" --no-info \
-	    $(CURDIR)/$(pkg)-align> $(CURDIR)/debian/$(pkg)/usr/share/man/man1/$(pkg)-align.1
+	debian/help2man-wrapper $(pkg) "wrapper for $(pkg)-align"
+	debian/help2man-wrapper $(pkg)-build "building a colorspace index for $(pkg)"
+	debian/help2man-wrapper $(pkg)-inspect "extracts information from a $(pkg) index"
+	debian/help2man-wrapper $(pkg)-align "ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences"
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS

-- 
ultrafast memory-efficient short read aligner



More information about the debian-med-commit mailing list