#!/usr/bin/make -f

# Do not include binaries usr/bin/{build,example-cli,example-hello-wordl} and do
# not build or run the flag generator.

export DH_GOLANG_EXCLUDES := build example-cli example-hello-world cmd/urfave-cli-genflags
export DH_GOLANG_INSTALL_EXTRA := autocomplete

# Do not use "DH_GOLANG_GO_GENERATE := 1" as itinvokes "make -C
# cmd/urfave-cli-genflags" run to rebuild the code generator. The generator's
# Makefile lacks a run target (or fails when the package is excluded from the Go
# build), causing the build to abort. Omitting it has no downside because
# zz_generated.flags.go is already checked into the upstream source tree.

# The buildsystem must be defined to ensure Go is used to build the package,
# and that Debhelper won't try to run the Makefile in the project
%:
	dh $@ --buildsystem=golang
