Source: libhdf4
Version: 4.2.12-3
Severity: wishlist
Tags: patch

Hi,

Could you please consider shipping the libhdf4 Java bindings
which were added in (I think) 4.2.12?  These are necessary
in order to be able to build the new hdfview beta.

A preliminary packaging patch is attached to create the
packages.  I have build-tested this and the .jar and JNI
files get installed appropriately and the hdfview
build process seems to pick them up.

Thanks,

Mark
diff --git a/debian/control.in b/debian/control.in
index af8a223..fd026ac 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -9,6 +9,8 @@ Build-Depends: debhelper (>= 9),
                autotools-dev,
                bison,
                chrpath,
+               default-jdk-headless,
+               javahelper,
                flex,
                gfortran,
                libjpeg-dev,
@@ -60,6 +62,29 @@ Description: Hierarchical Data Format development files (embedded NetCDF)
  This package contains development stuff, including files and static
  library for the HDF package and some HDF API reference manpages.
 
+Package: @PACKAGE@-java
+Architecture: any
+Section: java
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${java:Depends},
+         @PACKAGE@-jni
+Description: Hierarchical Data Format development files (embedded NetCDF)
+ HDF is a multi-object file format for storing and transferring
+ graphical and numerical data mainly used in scientific computing. HDF
+ supports several different data models, including multidimensional
+ arrays, raster images, and tables.
+ Each defines a specific aggregate data type and provides an API for
+ reading, writing, and organizing the data and metadata. New data models
+ can be added by the HDF developers or users.
+ .
+ This package contains the java wrapper library for HDF4.
+
+Package: @PACKAGE@-jni
+Architecture: any
+Section: java
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: native library used by libhdf4-java
+ This package is only useful with libhdf4-java
+
 Package: @PACKAGE@g-dev
 Architecture: all
 Section: libdevel
diff --git a/debian/libhdf4-java.jlibs b/debian/libhdf4-java.jlibs
new file mode 100644
index 0000000..d1e3f8b
--- /dev/null
+++ b/debian/libhdf4-java.jlibs
@@ -0,0 +1 @@
+debian/tmp/usr/lib/jarhdf.jar
diff --git a/debian/libhdf4-jni.install.in b/debian/libhdf4-jni.install.in
new file mode 100644
index 0000000..097d57a
--- /dev/null
+++ b/debian/libhdf4-jni.install.in
@@ -0,0 +1 @@
+usr/lib/libhdf_java.so usr/lib/@MULTIARCH@/jni
diff --git a/debian/rules b/debian/rules
index e6a73bd..d84dcca 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+(debian|dfsg|ds|deb)[0-9]*.*//; s/^[0-9]://')
 
@@ -46,6 +47,7 @@ templates:
 		sed -e 's/@PACKAGE@/$(PACKAGE)/g' \
 		    -e 's/@SOVER@/$(SOVER)/g' \
 		    -e 's/@RELEASE@/$(RELEASE)/g' \
+		    -e 's/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
 			$$TEMPLATE > `echo $$TEMPLATE | sed 's/.in$$//'` ; \
 	done
 
@@ -85,6 +87,7 @@ override_dh_auto_configure: templates
 	                     --libdir=/usr/lib \
 	                     --enable-shared \
 	                     --enable-fortran \
+			     --enable-java \
 	                     F77="$(F77)" CC="$(CC)" CXX="$(CXX)" \
 	                     CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
@@ -137,6 +140,16 @@ override_dh_auto_install:
 	                --builddirectory=debian/build-hdf4 \
 	                --destdir=$(DESTDIR)
 
+	mv $(DESTDIR)/usr/lib/jarhdf-*.jar \
+	   $(DESTDIR)/usr/lib/jarhdf.jar
+
+	rm -f $(DESTDIR)/usr/lib/libhdf_java.so
+
+	mv $(DESTDIR)/usr/lib/libhdf_java.so.0.0.0 \
+	   $(DESTDIR)/usr/lib/libhdf_java.so
+
+	jh_installlibs
+
 	dh_auto_install --sourcedirectory=HDF4_ALT \
 	                --builddirectory=debian/build-hdf4-alt \
 	                --destdir=$(DESTDIR_ALT)

Reply via email to