[med-svn] [fast5] 01/03: Install examples and configure tests

Afif Elghraoui afif at moszumanska.debian.org
Fri Oct 21 06:32:04 UTC 2016


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

afif pushed a commit to branch master
in repository fast5.

commit 53a8b4e98f04e4db1cc76e2c0e5a71372813de30
Author: Afif Elghraoui <afif at debian.org>
Date:   Thu Oct 20 23:20:30 2016 -0700

    Install examples and configure tests
---
 debian/examples               |  2 ++
 debian/patches/examples.patch | 62 +++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 debian/rules                  |  6 +++++
 debian/tests/control          | 17 ++++++++++++
 5 files changed, 88 insertions(+)

diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..68925c5
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1,2 @@
+src/*.cpp
+src/Makefile
diff --git a/debian/patches/examples.patch b/debian/patches/examples.patch
new file mode 100644
index 0000000..9510d88
--- /dev/null
+++ b/debian/patches/examples.patch
@@ -0,0 +1,62 @@
+Description: Adapt examples for Debian package
+ The location of the fast5 hdf header file is slightly different and
+ the HDF library/header locations are different.
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: not-needed
+Last-Update: 2016-10-20
+--- fast5.orig/src/Makefile
++++ fast5/src/Makefile
+@@ -4,9 +4,9 @@
+ .DELETE_ON_ERROR:
+ .PHONY: all help list clean check_hdf5
+ 
+-HDF5_DIR = /usr/local
+-HDF5_INCLUDE_DIR = ${HDF5_DIR}/include
+-HDF5_LIB_DIR = ${HDF5_DIR}/lib
++HDF5_DIR = /usr
++HDF5_INCLUDE_DIR ?= ${HDF5_DIR}/include/hdf5/serial
++HDF5_LIB_DIR ?= $(wildcard ${HDF5_DIR}/lib/*/hdf5/serial)
+ HDF5_LIB = hdf5
+ 
+ TARGETS = f5dump f5dump-full hdf5-mod f5-mod
+@@ -29,5 +29,5 @@
+ 	@[ -f "${HDF5_INCLUDE_DIR}/H5pubconf.h" ] || { echo "HDF5 headers not found" >&2; exit 1; }
+ 	@[ -f "${HDF5_LIB_DIR}/lib${HDF5_LIB}.so" ] || [ -f "${HDF5_LIB_DIR}/lib${HDF5_LIB}.a" ] || { echo "HDF5 library not found" >&2; exit 1; }
+ 
+-%: %.cpp fast5.hpp hdf5_tools.hpp | check_hdf5
+-	${CXX} -std=c++11 -O0 -g3 -ggdb -fno-eliminate-unused-debug-types -Wall -Wextra -Wpedantic -isystem ${HDF5_INCLUDE_DIR} -o $@ $< -L${HDF5_LIB_DIR} -Wl,--rpath=${HDF5_LIB_DIR} -l${HDF5_LIB} -lpthread -lz -ldl
++%: %.cpp | check_hdf5
++	${CXX} ${CPPFLAGS} ${CXXFLAGS} -std=c++11 -O0 -g3 -ggdb -fno-eliminate-unused-debug-types -Wall -Wextra -Wpedantic -isystem ${HDF5_INCLUDE_DIR} -o $@ $< -L${HDF5_LIB_DIR} -Wl,--rpath=${HDF5_LIB_DIR} -l${HDF5_LIB} -lpthread -lz -ldl
+--- fast5.orig/src/hdf5-mod.cpp
++++ fast5/src/hdf5-mod.cpp
+@@ -2,7 +2,7 @@
+ #include <iostream>
+ #include <string>
+ 
+-#include "hdf5_tools.hpp"
++#include <fast5/hdf5_tools.hpp>
+ 
+ using namespace std;
+ using namespace hdf5;
+--- fast5.orig/src/f5dump.cpp
++++ fast5/src/f5dump.cpp
+@@ -2,7 +2,7 @@
+ #include <iostream>
+ #include <string>
+ 
+-#include "fast5.hpp"
++#include <fast5.hpp>
+ 
+ using namespace std;
+ 
+--- fast5.orig/src/f5dump-full.cpp
++++ fast5/src/f5dump-full.cpp
+@@ -2,7 +2,7 @@
+ #include <iostream>
+ #include <string>
+ 
+-#include "fast5.hpp"
++#include <fast5.hpp>
+ 
+ using namespace std;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 35f09db..7dc224e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 relative-paths.patch
+examples.patch
 rpath.patch
diff --git a/debian/rules b/debian/rules
index 856e07e..f8f630d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,13 @@ override_dh_auto_build:
 	ln -sf ../hdf5_tools.hpp src/fast5/hdf5_tools.hpp
 	dh_auto_build
 
+override_dh_auto_test:
+	cd src && $(MAKE) CPPFLAGS=-I$(CURDIR)/src
+
 override_dh_auto_clean:
 	cd src && $(MAKE) clean
 	$(RM) -r src/fast5
 	dh_auto_clean
+
+override_dh_compress:
+	dh_compress -X .cpp
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d9427c8
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,17 @@
+Test-Command:
+	cp /usr/share/doc/libfast5-dev/examples/* $ADTTMP
+	&& cd $ADTTMP
+	&& make
+Depends:
+	build-essential,
+	libfast5-dev,
+
+Test-Command:
+	python -c "import fast5"
+Depends:
+	python-fast5
+
+Test-Command:
+	python3 -c "import fast5"
+Depends:
+	python3-fast5

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



More information about the debian-med-commit mailing list