#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export DH_GOLANG_INSTALL_EXTRA := assets templates README.md

%:
	dh $@ --builddirectory=_build --buildsystem=golang

execute_before_dh_auto_configure:
	sed s/{{.version}}/v$(DEB_VERSION)/ version/number.go.tmpl > version/number.go

execute_before_dh_installman:
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	help2man --include=debian/lintian-ssg.1.include --no-info \
		_build/bin/lintian-ssg -o _build/lintian-ssg.1
endif

override_dh_auto_install:
	dh_auto_install -- --no-source
