#!/usr/bin/make -f

# We're only interested in the library for now
export DH_GOLANG_EXCLUDES := assert/cmd icmd/internal/stub

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

override_dh_auto_configure:
	# gotest.tools >= v2.2.0 contains invalid symlinks in fs/testdata
	# which dh-golang does not copy but are needed by TestFromDirSymlink
	dh_auto_configure -O--buildsystem=golang
	cp -av fs/testdata/copy-test-with-symlink \
		obj-$(DEB_HOST_GNU_TYPE)/src/gotest.tools/fs/testdata/
