#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export DH_GOLANG_INSTALL_EXTRA := $(shell find . -name test-fixtures) \
	                          $(wildcard builder/azure/common/template/*approved*) \
				  $(wildcard builder/azure/arm/*approved*)
export DH_GOLANG_EXCLUDES := plugin/example scripts
export HOME := $(shell mktemp -d)

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

override_dh_auto_configure:
	# remove these disabled plugins source to skip failed tests on them
	rm -rf builder/oneandone builder/profitbricks builder/triton
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_installdocs:
	pandoc -f markdown -t plain -o README README.md
	dh_installdocs -A README
