#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export DH_GOLANG_INSTALL_EXTRA := man/man1 shell
GO_LDFLAGS = "-X main.version=$(DEB_VERSION_UPSTREAM) \
               -X main.revision=$(DEB_VENDOR)"

%:
	dh $@ --builddirectory=debian/_build --with=golang

override_dh_auto_build:
	$(DH_OVERRIDDEN_COMMAND) -- -ldflags $(GO_LDFLAGS)

override_dh_auto_install:
	$(DH_OVERRIDDEN_COMMAND) -- --no-source

override_dh_compress:
	dh_compress -Xkey-bindings -Xcompletion -Xfzf.vim
