#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk sampledir:=$(CURDIR)/debian/$(DEB_SOURCE)-examples/usr/share/doc/$(DEB_SOURCE)/examples BUILDARCH:=$(shell dpkg-architecture -q DEB_BUILD_ARCH_ENDIAN) P3CORE_FAILED_TESTS:='primer_masker' \ 'primer_masker_formatted' FAILED_TESTS:=testmasker %: dh $@ --sourcedirectory=src override_dh_auto_build: dh_auto_build -- 'CPP=$$(CXX)' override_dh_auto_install: dh_auto_install -- PREFIX=debian/$(DEB_SOURCE)/usr override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifneq ($(BUILDARCH),little) cp -a test/p3test.pl test/p3test.pl~ cp -a test/Makefile test/Makefile~ # exclude tests known to fail on big endian # See README.source for further explanation. for tst in $(P3CORE_FAILED_TESTS) ; do sed -i "/$${tst}.,/d" test/p3test.pl ; done for tst in $(FAILED_TESTS); do sed -i "/^test:/s/$$tst//" test/Makefile; done endif dh_auto_test --no-parallel --sourcedirectory=test ifneq ($(BUILDARCH),little) # restore original test file mv test/p3test.pl~ test/p3test.pl mv test/Makefile~ test/Makefile endif dh clean --sourcedirectory=test endif execute_after_dh_installexamples: mkdir -p $(sampledir)/test; mkdir -p $(sampledir)/src; mkdir -p $(sampledir)/settings_files; mkdir -p $(sampledir)/kmer_lists; cp -aR ./test/* $(sampledir)/test; cp -aR ./src/humrep_and_simple.txt $(sampledir)/src; cp -a settings_files/primer*.txt $(sampledir)/settings_files; cp -aR ./kmer_lists/*.list $(sampledir)/kmer_lists; chmod -x $(sampledir)/test/thal* chmod -x $(sampledir)/test/amplicon3/amplicons.csv chmod -x $(sampledir)/test/primer_windows_newlines_input sed -i 's#/usr/local/bin/perl#/usr/bin/perl#' $(sampledir)/test/long_seq_tm_test.pl ; sed -i 's#/usr/local/bin/perl#/usr/bin/perl#' $(sampledir)/test/vgrep.pl ; execute_after_dh_auto_clean: rm -rf ${CURDIR}/src/debian