#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/dpkg/default.mk docdir := $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE) ifeq ($(DEB_HOST_GNU_CPU),x86_64) USEOPT:=yes else ifeq ($(DEB_HOST_GNU_CPU),i386) USEOPT:=yes else USEOPT:=no endif endif export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ override_dh_auto_build: dh_auto_build markdown_py -f README.html README.md VDATADIR=/usr/share/vsearch/data ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: if [ -d $(VDATADIR) ] ; then \ mkdir -p ../vsearch-data && \ for datadir in `find $(VDATADIR) -type d | sed -e "s#$(VDATADIR)/*##" -e "/^$$/d"` ; do mkdir -p ../vsearch-data/$${datadir} ; done && \ for datafile in `find $(VDATADIR) -type f` ; do \ ln -s $${datafile} `echo $${datafile} | sed -e "s#$(VDATADIR)/#../vsearch-data/#"` ; \ done && \ zcat ../vsearch-data/BioMarKs.fsa.gz > ../vsearch-data/BioMarKs.fsa && \ cd test && \ for t in *.sh ; do \ bash $$t v ; \ done && \ cd .. && \ rm -rf ../vsearch-data ; \ fi endif override_dh_clean: dh_clean rm -rf data/simm if [ -d test ] ; then find test -mindepth 1 -not -name '*.sh' -delete ; fi rm -f README.html data/README.html rm -f *.out override_dh_install: dh_install if [ -d test ] ; then \ # tweak path tp vsearch binary in test scripts \ mkdir -p $(docdir)/test ; \ for tst in test/*.sh ; do sed 's?\.\./bin/vsearch?/usr/bin/vsearch?' $${tst} > $(docdir)/$${tst} ; done ; \ fi