#!/usr/bin/make -f

builddir := $(CURDIR)/obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DH_GOPKG := $(shell grep ^XS-Go-Import-Path: debian/control | cut -d' ' -f2)

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

override_dh_auto_test:
	cp -a samples $(builddir)/src/$(DH_GOPKG)/
	dh_auto_test -O--buildsystem=golang
	rm -rf $(builddir)/src/$(DH_GOPKG)/samples
