[med-svn] r4078 - in trunk/packages/last-align/trunk/debian: . patches

Andreas Tille tille at alioth.debian.org
Tue Sep 29 21:27:48 UTC 2009


Author: tille
Date: 2009-09-29 21:27:48 +0000 (Tue, 29 Sep 2009)
New Revision: 4078

Added:
   trunk/packages/last-align/trunk/debian/dirs
   trunk/packages/last-align/trunk/debian/patches/
   trunk/packages/last-align/trunk/debian/patches/20_help_output_2_stdout.patch
   trunk/packages/last-align/trunk/debian/patches/series
Modified:
   trunk/packages/last-align/trunk/debian/changelog
   trunk/packages/last-align/trunk/debian/control
   trunk/packages/last-align/trunk/debian/rules
Log:
Trying to create manpages via help2man wherever possible


Modified: trunk/packages/last-align/trunk/debian/changelog
===================================================================
--- trunk/packages/last-align/trunk/debian/changelog	2009-09-29 19:33:39 UTC (rev 4077)
+++ trunk/packages/last-align/trunk/debian/changelog	2009-09-29 21:27:48 UTC (rev 4078)
@@ -1,3 +1,16 @@
+last-align (62-1) unstable; urgency=low
+
+  * New upstream version
+  * debian/control:
+    - Added myself to upstream
+    - Standards-Version: 3.8.3
+    - BUild-Depends: help2man, quilt
+  * debian/rules: Try to create manpages via help2man wherever possible
+  * debian/patches: Make sure help output goes to stdout as GNU coding
+    style suggests and is needed by help2man
+
+ -- Andreas Tille <tille at debian.org>  Tue, 29 Sep 2009 13:38:57 +0200
+
 last-align (58-1) unstable; urgency=low
 
   * New upstream release able to use sequence quality scores. 

Modified: trunk/packages/last-align/trunk/debian/control
===================================================================
--- trunk/packages/last-align/trunk/debian/control	2009-09-29 19:33:39 UTC (rev 4077)
+++ trunk/packages/last-align/trunk/debian/control	2009-09-29 21:27:48 UTC (rev 4078)
@@ -3,9 +3,10 @@
 Priority: optional
 Maintainer: Debian-Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 DM-Upload-Allowed: yes
-Uploaders: Charles Plessy <plessy at debian.org>
-Build-Depends: debhelper (>= 7), cdbs
-Standards-Version: 3.8.1
+Uploaders: Charles Plessy <plessy at debian.org>,
+ Andreas Tille <tille at debian.org>
+Build-Depends: debhelper (>= 7), cdbs, help2man, quilt
+Standards-Version: 3.8.3
 Homepage: http://last.cbrc.jp/
 Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/last-align/trunk/?rev=0&sc=0
 Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/last-align/trunk/

Added: trunk/packages/last-align/trunk/debian/dirs
===================================================================
--- trunk/packages/last-align/trunk/debian/dirs	                        (rev 0)
+++ trunk/packages/last-align/trunk/debian/dirs	2009-09-29 21:27:48 UTC (rev 4078)
@@ -0,0 +1 @@
+/usr/share/man/man1/

Added: trunk/packages/last-align/trunk/debian/patches/20_help_output_2_stdout.patch
===================================================================
--- trunk/packages/last-align/trunk/debian/patches/20_help_output_2_stdout.patch	                        (rev 0)
+++ trunk/packages/last-align/trunk/debian/patches/20_help_output_2_stdout.patch	2009-09-29 21:27:48 UTC (rev 4078)
@@ -0,0 +1,56 @@
+Author: Andreas Tille <tille at debian.org>
+Description: According to GNU coding standards help messages should go to stdout
+ not to stderr.  THis patch ensures that help2man will work correctly
+--- last-62.orig/src/LastalArguments.cc
++++ last-62/src/LastalArguments.cc
+@@ -4,6 +4,8 @@
+ #include "stringify.hh"
+ #include <unistd.h>  // getopt
+ #include <sstream>
++#include <cstdlib>
++#include <iostream>
+ #include <vector>
+ #include <stdexcept>
+ #include <cstring>  // strtok
+@@ -108,7 +110,8 @@
+ 	 != -1 ){
+     switch(c){
+     case 'h':
+-      throw std::runtime_error(help);
++      std::cout << help ;
++      exit(1);
+     case 'o':
+       outFile = optarg;
+       break;
+--- last-62.orig/src/LastdbArguments.cc
++++ last-62/src/LastdbArguments.cc
+@@ -2,6 +2,8 @@
+ 
+ #include "LastdbArguments.hh"
+ #include "stringify.hh"
++#include <cstdlib>
++#include <iostream>
+ #include <unistd.h>  // getopt
+ #include <stdexcept>
+ 
+@@ -27,6 +29,7 @@
+ usage: lastdb [options] output-name fasta-sequence-file(s)\n\
+ \n\
+ Main Options (default settings):\n\
++-h: show all options and their default settings\n\
+ -p: interpret the sequences as proteins\n\
+ -c: read the sequences case-sensitively\n\
+ -m: periodic spaced-seed pattern (" + maskPattern + ")\n\
+@@ -40,8 +43,11 @@
+ ";
+ 
+   int c;
+-  while( (c = getopt(argc, argv, "pcm:w:s:a:b:v")) != -1 ) {
++  while( (c = getopt(argc, argv, "hpcm:w:s:a:b:v")) != -1 ) {
+     switch(c){
++    case 'h':
++      std::cout << usage;
++      exit(1);
+     case 'p':
+       isProtein = true;
+       break;

Added: trunk/packages/last-align/trunk/debian/patches/series
===================================================================
--- trunk/packages/last-align/trunk/debian/patches/series	                        (rev 0)
+++ trunk/packages/last-align/trunk/debian/patches/series	2009-09-29 21:27:48 UTC (rev 4078)
@@ -0,0 +1 @@
+20_help_output_2_stdout.patch

Modified: trunk/packages/last-align/trunk/debian/rules
===================================================================
--- trunk/packages/last-align/trunk/debian/rules	2009-09-29 19:33:39 UTC (rev 4077)
+++ trunk/packages/last-align/trunk/debian/rules	2009-09-29 21:27:48 UTC (rev 4078)
@@ -7,21 +7,44 @@
 # http://debian-med.alioth.debian.org/docs/policy.html
 
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/cdbs/1/class/makefile.mk
 
 DEB_MAKE_BUILD_TARGET   = --directory src
 
+pkg=last-align
+version=$(shell dpkg-parsechangelog | grep "^Version:" | sed -e "s/^Version:[[:space:]]\+\([\.0-9]*\)-[0-9]\+[[:space:]]*/\1/" )
+
 clean::
 	$(RM) src/lastdb src/lastal src/*.o
 
-binary-fixup/last-align::
-	prename 's/.py$$//' debian/last-align/usr/bin/*py
-	prename 's/.sh$$//' debian/last-align/usr/bin/*sh
-	mv debian/last-align/usr/share/doc/last-align/ChangeLog.txt.gz debian/last-align/usr/share/doc/last-align/changelog.gz
+binary-fixup/$(pkg)::
+	prename 's/.py$$//' debian/$(pkg)/usr/bin/*py
+	prename 's/.sh$$//' debian/$(pkg)/usr/bin/*sh
+	mv debian/$(pkg)/usr/share/doc/$(pkg)/ChangeLog.txt.gz debian/$(pkg)/usr/share/doc/$(pkg)/changelog.gz
+	# try to create man pages whereever possible
+	help2man --no-info --name='make a dotplot, a.k.a. Oxford Grid, of alignments in LAST tabular format' \
+	    --version-string="$(version)" \
+	         $(CURDIR)/scripts/last-dotplot.py > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/last-dotplot.1
+	help2man --no-info --name="genome-scale comparison of biological sequences" \
+	    --version-string="$(version)" --help-option="-h" \
+                 $(CURDIR)/src/lastal > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/lastal.1
+	help2man --no-info --name="genome-scale comparison of biological sequences" \
+	    --version-string="$(version)" --help-option="-h" \
+                 $(CURDIR)/src/lastdb > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/lastdb.1
+	help2man --no-info --version-string="$(version)" \
+                 --name="Sort MAF-format alignments by sequence name" \
+                 $(CURDIR)/scripts/maf-sort.sh > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/maf-sort.1
+	help2man --no-info --version-string="$(version)" \
+                 --name="changes the order of the sequences in MAF-format alignments" \
+                 $(CURDIR)/scripts/maf-swap.py > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/maf-swap.1
+	help2man --no-info --version-string="$(version)" \
+                 --name=" " \
+                 $(CURDIR)/scripts/maf2html.py > $(CURDIR)/debian/$(pkg)/usr/share/man/man1/maf2html.1
 
 # The unzip command from the unzip package is needed for this one.
 # Please update debian/changelog before calling this target.
 get-orig-source:
 	[ -f ../last-$(DEB_UPSTREAM_VERSION).zip ] || uscan --force-download
 	unzip ../last-$(DEB_UPSTREAM_VERSION).zip -d..
-	tar --create --gzip --file ../last-align_$(DEB_UPSTREAM_VERSION).orig.tar.gz ../last-$(DEB_UPSTREAM_VERSION)
+	tar --create --gzip --file ../$(pkg)_$(DEB_UPSTREAM_VERSION).orig.tar.gz ../last-$(DEB_UPSTREAM_VERSION)




More information about the debian-med-commit mailing list