--- a/debian/rules 2016-07-03 10:05:37.274942258 +0200 --- b/debian/rules 2016-07-03 10:10:55.677795421 +0200 @@ -6,10 +6,15 @@ # 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 debian/golang-github-miekg-pkcs11-dev/usr/share/gocode/src/github.com/miekg/pkcs11/LICENSE + rm -f $(MODULE_DIR)/LICENSE + + # Remove tests & related non-reproducible output + rm -f $(MODULE_DIR)/hsm.db rm -f $(MODULE_DIR)/*_test.db