Commit e323eda6 authored by Andreas Tille's avatar Andreas Tille
Browse files

Clean up rules and document current issue with private header of hdf5 lib H5private.h

parent 3a498af7
Loading
Loading
Loading
Loading
+12 −26
Original line number Diff line number Diff line
@@ -16,31 +16,22 @@ TESTIGNORE = sourceTest/java/ch/systemsx/cisd/hdf5/HDF5RoundtripTest.java \
             sourceTest/java/ch/systemsx/cisd/hdf5/io/HDF5DataSetRandomAccessFileTest.java

%:
	dh $@ --with javahelper --buildsystem=gradle
	dh $@ --with javahelper

override_jh_installlibs:
	mv targets/gradle/libs/sis-jhdf5-1.jar targets/gradle/libs/sis-jhdf5.jar
	jh_installlibs --version-strip='[~pre1]*[+]git[.0-9a-f]*[+]dfsg[.0-9]*'

_override_dh_auto_clean:
	rm -rf build *.jar
	rm -rf source/c/*.log
	rm -rf source/c/*.so
	# Stuff generated during testing
	find sourceTest/java -name '*.class' -delete
	cd sourceTest/java && rm -f *.hdf *.h5
	rm -f sourceTest/java/sourceTest/java/test/hdf5lib/h5ex_g_iterate.hdf
	rm -rf test-output targets
	#Things that we'd probably exclude from the orig.tar.gz anyway
	rm -rf jsrc lib ./sourceTest/java/jni

_override_dh_auto_build:
	# C build
override_dh_auto_build:
	dh_auto_build
	# Create JNI manually since this is not part of the build system
	# Upsteam seems to `cd source/c` and call a script which in turn calls compile_hdf5_gcc.sh
	# In this script hdf5 source is unpacked, possibly patched, build and used for the JNI build
	# Most problematic issue is that private header H5private.h is used
	cd source/c && \
		$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)  -shared -fPIC -Wl,--exclude-libs,ALL \
		-I/usr/lib/jvm/default-java/include/ -I/usr/include/hdf5/serial \
		*.c jni/*.c -o libsis-jhdf5.so -lz -lhdf5_serial
	jh_build sis-jhdf5.jar src

override_jh_installlibs:
	mv targets/gradle/libs/sis-jhdf5-1.jar targets/gradle/libs/sis-jhdf5.jar
	jh_installlibs --version-strip='[~pre1]*[+]git[.0-9a-f]*[+]dfsg[.0-9]*'

_override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -73,8 +64,3 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mv debian/tmptestignore/* sourceTest/java/test/hdf5lib
	rmdir debian/tmptestignore
endif

_override_dh_install:
	dh_install
	mkdir -p debian/libsis-jhdf5-java/usr/bin
	cp -a dist/bin/h5ar.sh debian/libsis-jhdf5-java/usr/bin