#!/usr/bin/make -f

# we need our test artifacts too
export DH_GOLANG_INSTALL_ALL := 1

# github.com/miekg/pkcs11/test requires more test parameters
export DH_GOLANG_EXCLUDES := github.com/miekg/pkcs11/test

MODULE_DIR = debian/golang-github-miekg-pkcs11-dev/usr/share/gocode/src/github.com/miekg/pkcs11

%:
	dh $@ --buildsystem=golang --with=golang

override_dh_auto_install:
	dh_auto_install
	# Remove extra license file copied by DH_GOLANG_INSTALL_ALL
	rm -f $(MODULE_DIR)/LICENSE
	# Remove tests & related non-reproducible output
	rm -f $(MODULE_DIR)/hsm.db rm -f $(MODULE_DIR)/*_test.db
