[med-svn] [libssw] 01/07: add command line tool

Sascha Steinbiss satta at debian.org
Fri Jun 24 15:03:56 UTC 2016


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

satta pushed a commit to branch master
in repository libssw.

commit 5e61aa27eecd3019028ce2a51ff16a795b19ebc1
Author: Sascha Steinbiss <satta at debian.org>
Date:   Fri Jun 24 14:23:25 2016 +0000

    add command line tool
---
 debian/control                   | 14 ++++++++++++
 debian/patches/rename_tool.patch | 46 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 debian/rules                     |  2 +-
 debian/ssw-align.install         |  1 +
 debian/ssw-align.links           |  1 +
 6 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 28f9d96..ff3e1f7 100644
--- a/debian/control
+++ b/debian/control
@@ -60,3 +60,17 @@ Description: Java bindings for libssw
  implementation of the Smith-Waterman algorithm using Single-Instruction
  Multiple-Data (SIMD) instructions to parallelize the algorithm at the
  instruction level.
+
+Package: ssw-align
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         libssw0 (= ${binary:Version})
+Description: Smith-Waterman aligner based on libssw
+ This package provides a command-line aligner based on the libssw library,
+ a fast SIMD accelerated implementation of the Smith-Waterman algorithm.
+ The input files can be in FASTA or FASTQ format. Both target and query files
+ can contain multiple sequences. Each sequence in the query file will be
+ aligned with all sequences in the target file. Output is provided in SAM or
+ BLAST-like text format.
+
diff --git a/debian/patches/rename_tool.patch b/debian/patches/rename_tool.patch
new file mode 100644
index 0000000..e11ea26
--- /dev/null
+++ b/debian/patches/rename_tool.patch
@@ -0,0 +1,46 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -4,9 +4,10 @@
+ #CXXFLAGS := $(CFLAGS)
+ LOBJS = ssw.o
+ LCPPOBJS = ssw_cpp.o
+-PROG = ssw_test
++PROG = ssw-align
+ SOVERS=.0
+ LIB = libssw.so$(SOVERS)
++LLIB = libssw.so
+ STATICLIB = libssw.a
+ EXAMPLE = example_c
+ EXAMPLE_CPP = example_cpp
+@@ -26,14 +27,18 @@
+ $(LIB): ssw.c ssw.h ssw_cpp.h ssw_cpp.cpp
+ 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -shared -rdynamic -Wl,-soname,$(LIB) -o $@ $^ $(LDFLAGS)
+ 
++$(LLIB): $(LIB)
++	ln -s $< $@
++
+ $(STATICLIB): $(LOBJS) $(LCPPOBJS)
+ 	ar rcs $@ $^
+ 
+-$(PROG): main.c kseq.h
++$(PROG): main.c kseq.h $(LLIB)
++	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ main.c kseq.h -L. -lssw -lm -lz
+ 
+ $(EXAMPLE): example.c
+ 
+-$(PROG) $(EXAMPLE): $(LOBJS)
++$(EXAMPLE): $(LOBJS)
+ 	$(CC) -o $@ $(filter-out %.h,$^) $(CPPFLAGS) $(CFLAGS) -lm -lz $(LDFLAGS)
+ 
+ $(EXAMPLE_CPP): example.cpp $(LOBJS) $(LCPPOBJS)
+--- a/src/main.c
++++ b/src/main.c
+@@ -294,7 +294,7 @@
+ 	}
+ 	if (optind + 2 > argc) {
+ 		fprintf(stderr, "\n");
+-		fprintf(stderr, "Usage: ssw_test [options] ... <target.fasta> <query.fasta>(or <query.fastq>)\n");
++		fprintf(stderr, "Usage: %s [options] ... <target.fasta> <query.fasta>(or <query.fastq>)\n", argv[0]);
+ 		fprintf(stderr, "Options:\n");
+ 		fprintf(stderr, "\t-m N\tN is a positive integer for weight match in genome sequence alignment. [default: 2]\n");
+ 		fprintf(stderr, "\t-x N\tN is a positive integer. -N will be used as weight mismatch in genome sequence alignment. [default: 2]\n");
diff --git a/debian/patches/series b/debian/patches/series
index ad20a84..d163b77 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 build_all_libs.patch
 hardening.patch
+rename_tool.patch
diff --git a/debian/rules b/debian/rules
index 0ca3473..11e4357 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ PKG_VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/-.*
 	dh $@
 
 override_dh_auto_clean:
-	rm -f debian/*install debian/*links
+	rm -f debian/libssw*install debian/libssw*links
 	$(MAKE) -C src clean
 
 override_dh_auto_build:
diff --git a/debian/ssw-align.install b/debian/ssw-align.install
new file mode 100644
index 0000000..78a9739
--- /dev/null
+++ b/debian/ssw-align.install
@@ -0,0 +1 @@
+src/ssw-align usr/bin
diff --git a/debian/ssw-align.links b/debian/ssw-align.links
new file mode 100644
index 0000000..a936d36
--- /dev/null
+++ b/debian/ssw-align.links
@@ -0,0 +1 @@
+usr/bin/ssw-align usr/bin/ssw_test

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



More information about the debian-med-commit mailing list