#!/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 \
                             builder/azure builder/ncloud builder/oneandone builder/oracle \
                             builder/profitbricks builder/scaleway builder/triton \
                             builder/tencentcloud builder/hcloud
export HOME := $(shell mktemp -d)

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

override_dh_auto_configure:
	cp -rvT debian/vendor ./vendor
ifneq (,$(filter $(DEB_HOST_ARCH),mipsel))
	# mipsel is too slow, causing test timeout
	rm -v builder/googlecompute/step_create_windows_password_test.go
endif
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install -- --no-source
