DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
TESTPKG := $(DEBPKGNAME)-tests
+HTSLIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
# DEB_BUILD_OPTIONS := nocheck
%:
dh $@ --with python2 --buildsystem=pybuild
-# Cython is recreating some c-files. To enable building twice in a row these
-# will be saved in advance and restored afterwards
+# Make sure Cython is recreating some c-files. To enable building twice in a
+# row these will be saved in advance and restored afterwards
debian/savefiles:
mkdir -p debian/savefiles
- cp -a `grep -l "Generated by Cython" pysam/*.c` debian/savefiles
+ mv `grep -l "Generated by Cython" pysam/*.c` debian/savefiles
override_dh_clean:
dh_clean
fi
override_dh_auto_build: debian/savefiles
- dh_auto_build
+ HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) HTSLIB_INCLUDE_DIR=/usr/include dh_auto_build
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
LC_ALL=C.UTF-8 dh_auto_test -- --test --system=custom \
--test-args='set -e; \
cp -a $(CURDIR)/tests {build_dir}/tests ; \
- cd {build_dir}/tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test.py \
- && PYTHONPATH={build_dir} {interpreter} ./tabix_test.py '
+ cd {build_dir}/tests && HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) HTSLIB_INCLUDE_DIR=/usr/include PYTHONPATH={build_dir} {interpreter} ./pysam_test.py \
+ && HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) HTSLIB_INCLUDE_DIR=/usr/include PYTHONPATH={build_dir} {interpreter} ./tabix_test.py '
endif
override_dh_install-indep: