#!/usr/bin/make -f DH_VERBOSE := 1 include /usr/share/dpkg/default.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) export HTS_LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) export GIT_VERSION=$(DEB_VERSION) %: dh $@ --buildsystem cmake override_dh_clean: dh_clean find . -name "*.o" -delete rm -f README.html override_dh_auto_clean: dh_auto_clean || true override_dh_auto_configure: dh_auto_configure -- -DOPENMP=ON -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON override_dh_auto_build: dh_auto_build ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) markdown README.md > README.html endif override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) export LD_LIBRARY_PATH=$(CURDIR)/obj-${DEB_HOST_GNU_TYPE}/:$$LD_LIBRARY_PATH && cd test && $(MAKE) endif override_dh_install: dh_install find debian -name filevercmp.h -delete cp -a filevercmp/filevercmp.h debian/libvcflib-dev/usr/include/vcflib/ mkdir -p debian/libvcflib-dev/usr/include/intervaltree mv debian/libvcflib-dev/usr/include/vcflib/IntervalTree.h debian/libvcflib-dev/usr/include/intervaltree # install pkg-config file mkdir -p $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig mv libvcflib.pc $(CURDIR)/debian/libvcflib-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig rm -rf debian/*/usr/lib/vcflib/bin/*.R for pl in `grep -Rl '#!/usr/bin/env' debian/*/usr/*` ; do \ sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \ done override_dh_link: dh_link for rscript in debian/libvcflib-tools/usr/lib/vcflib/scripts/*.R ; do \ scriptname=$$(basename $$rscript) ; \ dh_link -p libvcflib-tools usr/lib/vcflib/scripts/$$scriptname usr/lib/R/site-library/vcflib/$$scriptname ; \ done override_dh_fixperms: dh_fixperms chmod -x debian/*/usr/lib/vcflib/scripts/*.R