[med-svn] [libssw] 01/01: add Java bindings

Sascha Steinbiss satta at debian.org
Fri Jun 24 10:44:18 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 f0d66e7a6a326c4dd7538f92ee698e83be3237b4
Author: Sascha Steinbiss <satta at debian.org>
Date:   Fri Jun 24 10:44:10 2016 +0000

    add Java bindings
---
 debian/control                      | 14 ++++++++++++++
 debian/libssw-java.install.in       |  2 ++
 debian/libssw-java.links.in         |  1 +
 debian/patches/build_all_libs.patch | 11 ++++++++++-
 debian/patches/hardening.patch      |  4 ++--
 debian/rules                        |  9 ++++++---
 6 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/debian/control b/debian/control
index 1d1d370..31776f7 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Sascha Steinbiss <satta at debian.org>
 Build-Depends: debhelper (>= 9),
                default-jdk-headless,
+               javahelper,
                dh-autoreconf,
                zlib1g-dev
 Standards-Version: 3.9.8
@@ -45,3 +46,16 @@ Description: 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.
+
+Package: libssw-java
+Architecture: any
+Section: java
+Depends: ${java:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends}
+Recommends: ${java:Recommends}
+Description: Java bindings for libssw
+ This package provides JNI based Java bindings 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/libssw-java.install.in b/debian/libssw-java.install.in
new file mode 100644
index 0000000..dbfe820
--- /dev/null
+++ b/debian/libssw-java.install.in
@@ -0,0 +1,2 @@
+src/libsswjni.so usr/lib/jni
+src/*jar /usr/share/java
diff --git a/debian/libssw-java.links.in b/debian/libssw-java.links.in
new file mode 100644
index 0000000..a14c17a
--- /dev/null
+++ b/debian/libssw-java.links.in
@@ -0,0 +1 @@
+usr/share/java/ssw- at DEB_JAVA_PKG_VERSION@.jar usr/share/java/ssw.jar
diff --git a/debian/patches/build_all_libs.patch b/debian/patches/build_all_libs.patch
index d2e965e..89f352e 100644
--- a/debian/patches/build_all_libs.patch
+++ b/debian/patches/build_all_libs.patch
@@ -41,9 +41,18 @@ Author: Sascha Steinbiss <sascha at steinbiss.name>
  
  $(PROG): main.c kseq.h
  
+@@ -41,7 +46,7 @@
+ 	jar cvfe $@ ssw.Example $^
+ 
+ %.class: %.java
+-	javac -cp ./ $<
++	javac -target 1.6 -source 1.6 -cp ./ $<
+ 	
+ ssw.o: ssw.c ssw.h
+ 	$(CC) -c -o $@ $< $(CFLAGS)
 @@ -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)
++	-rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) *.jar $(JAVA_OBJ) *~ $(STATICLIB)
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index 661df77..d0e72ea 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -39,7 +39,7 @@ Author: Sascha Steinbiss <sascha at steinbiss.name>
  $(JAVA_JAR): $(JAVA_OBJ)
  	jar cvfe $@ ssw.Example $^
 @@ -49,10 +49,10 @@
- 	javac -cp ./ $<
+ 	javac -target 1.6 -source 1.6 -cp ./ $<
  	
  ssw.o: ssw.c ssw.h
 -	$(CC) -c -o $@ $< $(CFLAGS)
@@ -50,4 +50,4 @@ Author: Sascha Steinbiss <sascha at steinbiss.name>
 +	$(CXX) -c -o $@ $< $(CPPFLAGS) $(CXXFLAGS)
  
  clean:
- 	-rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) $(JAVA_JAR) $(JAVA_OBJ) *~ $(STATICLIB)
+ 	-rm -f $(LOBJS) $(LCPPOBJS) $(PROG) $(LIB) $(EXAMPLE) $(EXAMPLE_CPP) $(JAVA_LIB) *.jar $(JAVA_OBJ) *~ $(STATICLIB)
diff --git a/debian/rules b/debian/rules
index 96eb42b..0bf69d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,8 @@
 
 # DH_VERBOSE := 1
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
-SOVERS=0
+DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+PKG_VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/-.*//')
 
 %:
 	dh $@
@@ -14,11 +15,13 @@ override_dh_auto_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
+override_dh_auto_install: debian/libssw0.install debian/libssw-dev.install debian/libssw-dev.links debian/libssw-java.install debian/libssw-java.links
+	mv src/ssw.jar src/ssw-$(PKG_VERSION).jar
 	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' $< > $@
+	sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
+            -e 's/@DEB_JAVA_PKG_VERSION@/$(PKG_VERSION)/g' $< > $@

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