[med-svn] [libssw] 02/03: add initial packaging
Sascha Steinbiss
satta at debian.org
Fri Jun 24 09:54:16 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 feaa6475432b44ff752325768f5fbfd64e498b0c
Author: Sascha Steinbiss <satta at debian.org>
Date: Fri Jun 24 09:49:16 2016 +0000
add initial packaging
---
debian/changelog | 5 ++++
debian/compat | 1 +
debian/control | 47 ++++++++++++++++++++++++++++++++++
debian/copyright | 31 ++++++++++++++++++++++
debian/libssw-dev.install.in | 2 ++
debian/libssw-dev.links.in | 1 +
debian/libssw0.install.in | 1 +
debian/patches/build_all_libs.patch | 43 +++++++++++++++++++++++++++++++
debian/patches/hardening.patch | 51 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 2 ++
debian/rules | 24 +++++++++++++++++
debian/source/format | 1 +
debian/upstream/metadata | 9 +++++++
debian/watch | 2 ++
14 files changed, 220 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..3e2929e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libssw (0.0~git20160511.7d84de2-1) UNRELEASED; urgency=medium
+
+ * Initial release. (Closes: #828042)
+
+ -- Sascha Steinbiss <satta at debian.org> Thu, 23 Jun 2016 14:20:09 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1d1d370
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,47 @@
+Source: libssw
+Section: science
+Priority: optional
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Uploaders: Sascha Steinbiss <satta at debian.org>
+Build-Depends: debhelper (>= 9),
+ default-jdk-headless,
+ dh-autoreconf,
+ zlib1g-dev
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libssw.git
+Vcs-Git: https://anonscm.debian.org/git/debian-med/libssw.git
+Homepage: https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library
+
+Package: libssw0
+Architecture: any
+Multi-Arch: same
+Section: libs
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ zlib1g
+Pre-Depends: ${misc:Pre-Depends}
+Description: fast SIMD parallelized implementation of the Smith-Waterman algorithm
+ SSW is a fast implementation of the Smith-Waterman algorithm, which uses the
+ Single-Instruction Multiple-Data (SIMD) instructions to parallelize the
+ algorithm at the instruction level. SSW library provides an API that can be
+ flexibly used by programs written in C, C++ and other languages. The library
+ can do protein and genome alignment directly.
+ Current version of this implementation is ~50 times faster than an ordinary
+ Smith-Waterman. It can return the Smith-Waterman score, alignment location
+ and traceback path (cigar) of the optimal alignment accurately; and return
+ the sub-optimal alignment score and location heuristically.
+
+Package: libssw-dev
+Provides: libssw-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ libssw0 (= ${binary:Version})
+Pre-Depends: ${misc:Pre-Depends}
+Description: Development headers and static libraries for libssw
+ This package provides development headers and static libraries for libssw,
+ a fast implementation of the Smith-Waterman algorithm using
+ Single-Instruction Multiple-Data (SIMD) instructions to parallelize the
+ algorithm at the instruction level.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c80a99f
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,31 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Contact: Mengyao Zhao <zhaomengyao at gmail.com>
+Upstream-Name: SSW Library
+Source: https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library
+
+Files: *
+Copyright: © 2012-2015 Boston College
+License: MIT
+
+Files: debian/*
+Copyright: © 2016 Sascha Steinbiss <satta at debian.org>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian/libssw-dev.install.in b/debian/libssw-dev.install.in
new file mode 100644
index 0000000..6cc1b4b
--- /dev/null
+++ b/debian/libssw-dev.install.in
@@ -0,0 +1,2 @@
+src/libssw.a usr/lib/@DEB_HOST_MULTIARCH@/
+src/ssw*h usr/include/
diff --git a/debian/libssw-dev.links.in b/debian/libssw-dev.links.in
new file mode 100644
index 0000000..d62a858
--- /dev/null
+++ b/debian/libssw-dev.links.in
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH@/libssw.so.0 usr/lib/@DEB_HOST_MULTIARCH@/libssw.so
diff --git a/debian/libssw0.install.in b/debian/libssw0.install.in
new file mode 100644
index 0000000..978b9d6
--- /dev/null
+++ b/debian/libssw0.install.in
@@ -0,0 +1 @@
+src/libssw.so.0 usr/lib/@DEB_HOST_MULTIARCH@/
diff --git a/debian/patches/build_all_libs.patch b/debian/patches/build_all_libs.patch
new file mode 100644
index 0000000..7969066
--- /dev/null
+++ b/debian/patches/build_all_libs.patch
@@ -0,0 +1,43 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -5,24 +5,29 @@
+ LOBJS = ssw.o
+ LCPPOBJS = ssw_cpp.o
+ PROG = ssw_test
+-LIB = libssw.so
++SOVERS=.0
++LIB = libssw.so$(SOVERS)
++STATICLIB = libssw.a
+ EXAMPLE = example_c
+ EXAMPLE_CPP = example_cpp
+ JAVA_JAR = ssw.jar
+ JAVA_LIB = libsswjni.so
+-JAVA_INLCUDES = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
++JAVA_INLCUDES = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux" -I/usr/lib/jvm/default-java/include/ -I/usr/lib/jvm/default-java/include/linux
+ JAVA_OBJ = ssw/Aligner.class ssw/Alignment.class ssw/Example.class
+
+ .PHONY: all default java clean
+
+-default: $(PROG) $(EXAMPLE) $(EXAMPLE_CPP) $(LIB)
++default: $(PROG) $(EXAMPLE) $(EXAMPLE_CPP) $(LIB) $(STATICLIB)
+
+ all: default java
+
+ java: $(JAVA_JAR) $(JAVA_LIB)
+
+-$(LIB): ssw.c ssw.h
+- $(CC) $(CFLAGS) -fPIC -shared -rdynamic -o $@ $<
++$(LIB): ssw.c ssw.h ssw_cpp.h ssw_cpp.cpp
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -shared -rdynamic -Wl,-soname,$(LIB) -o $@ $^
++
++$(STATICLIB): $(LOBJS) $(LCPPOBJS)
++ ar rcs $@ $^
+
+ $(PROG): main.c kseq.h
+
+@@ -50,4 +55,4 @@
+ $(CXX) -c -o $@ $< $(CXXFLAGS)
+
+ clean:
+- -rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) $(JAVA_JAR) $(JAVA_OBJ) *~
++ -rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) $(JAVA_JAR) $(JAVA_OBJ) *~ $(STATICLIB)
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..885f739
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,51 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,7 +1,7 @@
+ CC = gcc
+ CXX = g++
+-CFLAGS := -Wall -pipe -O3
+-CXXFLAGS := $(CFLAGS)
++#CFLAGS := -Wall -pipe -O3
++#CXXFLAGS := $(CFLAGS)
+ LOBJS = ssw.o
+ LCPPOBJS = ssw_cpp.o
+ PROG = ssw_test
+@@ -24,7 +24,7 @@
+ java: $(JAVA_JAR) $(JAVA_LIB)
+
+ $(LIB): ssw.c ssw.h ssw_cpp.h ssw_cpp.cpp
+- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -shared -rdynamic -Wl,-soname,$(LIB) -o $@ $^
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -shared -rdynamic -Wl,-soname,$(LIB) -o $@ $^ $(LDFLAGS)
+
+ $(STATICLIB): $(LOBJS) $(LCPPOBJS)
+ ar rcs $@ $^
+@@ -34,13 +34,13 @@
+ $(EXAMPLE): example.c
+
+ $(PROG) $(EXAMPLE): $(LOBJS)
+- $(CC) -o $@ $(filter-out %.h,$^) $(CFLAGS) -lm -lz
++ $(CC) -o $@ $(filter-out %.h,$^) $(CPPFLAGS) $(CFLAGS) -lm -lz $(LDFLAGS)
+
+ $(EXAMPLE_CPP): example.cpp $(LOBJS) $(LCPPOBJS)
+- $(CXX) -o $@ $^ $(CXXFLAGS) -lm -lz
++ $(CXX) -o $@ $^ $(CPPFLAGS) $(CXXFLAGS) -lm -lz $(LDFLAGS)
+
+ $(JAVA_LIB): sswjni.c ssw.c ssw.h
+- $(CC) $(CFLAGS) $(JAVA_INLCUDES) -fPIC -shared -rdynamic -o $@ $< ssw.c
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(JAVA_INLCUDES) -fPIC -shared -rdynamic -o $@ $< ssw.c $(LDFLAGS)
+
+ $(JAVA_JAR): $(JAVA_OBJ)
+ jar cvfe $@ ssw.Example $^
+@@ -49,10 +49,10 @@
+ javac -cp ./ $<
+
+ ssw.o: ssw.c ssw.h
+- $(CC) -c -o $@ $< $(CFLAGS)
++ $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
+
+ ssw_cpp.o: ssw_cpp.cpp ssw_cpp.h ssw.h
+- $(CXX) -c -o $@ $< $(CXXFLAGS)
++ $(CXX) -c -o $@ $< $(CPPFLAGS) $(CXXFLAGS)
+
+ clean:
+ -rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) $(JAVA_JAR) $(JAVA_OBJ) *~ $(STATICLIB)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ad20a84
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+build_all_libs.patch
+hardening.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..96eb42b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+# DH_VERBOSE := 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+SOVERS=0
+
+%:
+ dh $@
+
+override_dh_auto_clean:
+ rm -f debian/*install debian/*links
+ $(MAKE) -C src clean
+
+override_dh_auto_build:
+ $(MAKE) -C src default java
+
+override_dh_auto_install: debian/libssw0.install debian/libssw-dev.install debian/libssw-dev.links
+ dh_auto_install
+
+debian/%.install: debian/%.install.in
+ sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
+
+debian/%.links: debian/%.links.in
+ sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..c453d7c
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,9 @@
+Reference:
+ - Author: Mengyao Zhao and Wan-Ping Lee and Erik P. Garrison and Gabor T. Marth
+ Title: "SSW Library: An SIMD Smith-Waterman C/C++ Library for Use in Genomic Applications."
+ Journal: PLoS One
+ Year: 2013
+ Volume: 8
+ Pages: e82138
+ URL: http://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0082138
+ eprint: http://journals.plos.org/plosone/article/asset?id=10.1371%2Fjournal.pone.0082138.PDF
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..701addf
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library/tags .*/v?(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
--
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