Try to explicitly set HTSLIB_LIBRARY_DIR as recommended in https://github.com/pysam...
authorAndreas Tille <tille@debian.org>
Thu, 25 Sep 2014 13:12:04 +0000 (15:12 +0200)
committerAndreas Tille <tille@debian.org>
Thu, 25 Sep 2014 13:12:04 +0000 (15:12 +0200)
debian/rules

index 2484c243e7fa977890f985f49054df115cf9e068..c410ac9c408f6dbd88f5783b89034f9066e9145d 100755 (executable)
@@ -5,16 +5,18 @@ export PYBUILD_NAME=pysam
 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
@@ -25,15 +27,15 @@ override_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: