#!/usr/bin/make -f

# We want to ship only the library packages themselves in the go source, not
# the accompanying test scripts
export DH_GOLANG_EXCLUDES := tests/
export DH_GOLANG_EXCLUDES_ALL := 1

MANPAGES:=$(patsubst %.md,%.1,$(wildcard docs/*.md))
$(MANPAGES): $(info MANPAGES=$(MANPAGES))
## build man pages:
	go-md2man -in $(@:.1=.md) -out $@

override_dh_auto_build: $(MANPAGES)
	dh_auto_build -- -tags "seccomp selinux apparmor containers_image_ostree"

override_dh_auto_test:
	# TODO: Investigate how to get the tests to pass

%:
	dh $@ --buildsystem=golang --with=golang,bash-completion
