[med-svn] [subread] 01/04: d/rules: generate man pages d/filter.pl: do not print version, convert tabs to 4x spaces add regex to strip colon after the name in the header add regex to remove "invalid option -- '-'" add regex to fix unrecognized option '\-\-version' add regex to strip full path of a binary d/patches/fix_syntax.patch: s/coveage/coverage/

Alex Mestiashvili malex-guest at moszumanska.debian.org
Mon Mar 16 15:29:16 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 6e0c548593addc9aa227db62efe57308f3962566
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Sat Mar 14 20:32:45 2015 +0100

    d/rules: generate man pages
    d/filter.pl: do not print version, convert tabs to 4x spaces
     add regex to strip colon after the name in the header
     add regex to remove "invalid option -- '-'"
     add regex to fix unrecognized option '\-\-version'
     add regex to strip full path of a binary
    d/patches/fix_syntax.patch: s/coveage/coverage/
---
 debian/filter.pl                | 29 ++++++++++++++++++++---------
 debian/patches/fix_syntax.patch | 17 ++++++++++++++++-
 debian/rules                    | 39 ++++++++++++++++++++++++++++++++++++---
 3 files changed, 72 insertions(+), 13 deletions(-)

diff --git a/debian/filter.pl b/debian/filter.pl
index 312360d..8322a44 100755
--- a/debian/filter.pl
+++ b/debian/filter.pl
@@ -10,16 +10,27 @@ 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";
+    $version = $f->{Version} if exists $f->{Version};
+    #strip debian revision
+    $version =~ s/(.*)-1$/$1/;
 }
 
 while ( <STDIN> ) {
-
-        #multiline regex
-        undef $/;
-        $_ =~ s/([\w\d]*)\:\sunrecognized\soption\s\'--version\'/$1 $version/g;
-        $_ =~ s/\.SH\sDESCRIPTION.*Usage:/.SH USAGE:/gmxs;
-
-        print $_;
+    #multiline regex
+    undef $/;
+    # remove colon from the name
+    $_ =~ s/(\.TH\s([\w\d-]*)):/$1/gmxs;
+    # substitude unrecognized version string with the version
+    $_ =~ s/([\w\d]*)\:\sunrecognized\soption\s\'--version\'/$1 $version/g;
+    $_ =~ s/([\w\d]*)\:\sunrecognized\soption\s\'\\-\\-version\'/ $version/g;
+    # there are no invalid options
+    $_ =~ s/([\w\d]*)\:\sinvalid\soption\s--\s\'-\'/$1 $version/g;
+    # strip the header or duplicated body of coverageCount
+    $_ =~ s/\.SH\s(DESCRIPTION|SYNOPSIS).*(Usage:\"?|-p1\n\.PP)/.SH USAGE:\n/gmxs;
+    # strip full path 
+    $_ =~ s/\\fI\\,\/.*\/bin(\/utilities)?\///gmxs;
+    # tidy up help2man removeDuP output:
+    $_ =~ s/Repeated\sRead\sRemoval.*accessible:\s\'\'//xms;    
+    $_ =~ s/(.SH\sNAME\n[\w\d-]*):/$1/gxms;    
+    print $_;
 }
diff --git a/debian/patches/fix_syntax.patch b/debian/patches/fix_syntax.patch
index 94b8ae0..dc0bce0 100644
--- a/debian/patches/fix_syntax.patch
+++ b/debian/patches/fix_syntax.patch
@@ -1,4 +1,5 @@
-Subject: spelling-error-in-binary subread-buildindex sucessfully successfully
+Subject: spelling-error-in-binary subread-buildindex s/sucessfully/successfully/
+ coverageCount s/coveage/coverage/
 Origin: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 --- subread.orig/src/index-builder.c
 +++ subread/src/index-builder.c
@@ -11,3 +12,17 @@ Origin: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
  	}
  
  	exit(param);
+--- subread.orig/src/coverage_calc.c
++++ subread/src/coverage_calc.c
+@@ -28,9 +28,9 @@
+ 
+ void calcCount_usage()
+ {
+-	SUBREADprintf("\ncoveageCount v%s\n\n", SUBREAD_VERSION);
++	SUBREADprintf("\ncoverageCount v%s\n\n", SUBREAD_VERSION);
+ 	SUBREADprintf("Counting the coverage of mapped reads at each location on the entire reference genome.\n\n");
+-	SUBREADprintf("./ncoveageCount -i <sam_bam_input> -o <output_prefix>\n\n");
++	SUBREADprintf("./coverageCount -i <sam_bam_input> -o <output_prefix>\n\n");
+ }
+ 
+ void add_chro(char *sam_h)
diff --git a/debian/rules b/debian/rules
index ccf8e6a..eb89a2d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,8 +6,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/
-
+mandir := $(CURDIR)/debian/$(pkg)/usr/share/man/man1
+bindir:= $(CURDIR)/bin
+utildir:= $(CURDIR)/bin/utilities
 
 %:
 	dh $@
@@ -28,8 +29,40 @@ 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
+	$(HELP2MAN) --name='an accurate and efficient aligner for mapping both genomic \
+DNA-seq reads and RNA-seq reads (for the purpose of expression analysis)' \
+	$(bindir)/subread-align | debian/filter.pl > $(mandir)/subread-align.1;
+
+	$(HELP2MAN) --name='builds an base-space or color-space index using the reference sequences' \
+	$(bindir)/subread-buildindex | debian/filter.pl > $(mandir)/subread-buildindex.1;
+
+	$(HELP2MAN) --name='an RNA-seq aligner suitable for all purposes of RNA-seq analyses' \
+	$(bindir)/subjunc | debian/filter.pl > $(mandir)/subjunc.1;
+
+	$(HELP2MAN) --name='a highly efficient and accurate read summarization program' \
+	$(bindir)/featureCounts | debian/filter.pl > $(mandir)/featureCounts.1;
+
+	$(HELP2MAN) --name='a SNP caller that discovers SNPs by testing signals against local background noises' \
+	$(bindir)/exactSNP | debian/filter.pl > $(mandir)/exactSNP.1;
+
+	$(HELP2MAN) --name='detect short and long indels' \
+	$(bindir)/subindel | debian/filter.pl > $(mandir)/subindel.1;
+
+	$(HELP2MAN) --name='scans the entire genome and reports all matches of a specified sequence' \
+	$(utildir)/subread-fullscan | debian/filter.pl > $(mandir)/subread-fullscan.1;
+
+	$(HELP2MAN) --name='counting the coverage of mapped reads at each location on the entire reference genome' \
+	$(utildir)/coverageCount | debian/filter.pl > $(mandir)/coverageCount.1;
+
+	$(HELP2MAN) --name='calculate the proportion of mapped reads/fragments' \
+	$(utildir)/propmapped | debian/filter.pl > $(mandir)/propmapped.1;
+
+	for i in globalReassembly removeDup qualityScores subtools ; do \
+	$(HELP2MAN) --name='a component of subread suite' $(utildir)/$$i | debian/filter.pl > $(mandir)/$$i.1; \
+	done
+
 	dh_auto_install
 
 override_dh_installexamples:

-- 
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