#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

SKIP_TESTS = $(shell cat debian/tests/pkg-perl/smoke-skip)
TEST_FILES = $(filter-out $(SKIP_TESTS), $(wildcard t/*.t))

%:
	dh $@ --buildsystem=perl_build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	RES_OPTIONS=attempts:0 dh_auto_test -- --test_files "$(TEST_FILES)"
endif

override_dh_auto_install:
	dh_auto_install
	# remove empty manpage without whatis entry
	$(RM) -v $(TMP)/usr/share/man/man3/Bio::PrimerDesigner::Config.3pm
