#! /usr/bin/make -f

VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
SHIM_VERSION := $(shell dpkg-query -f '$${Version}\n' -W shim)

%:
	dh $@

docdir := debian/shim-signed/usr/share/doc/shim-signed

override_dh_installchangelogs:
	dh_installchangelogs
	# Quieten lintian, which otherwise gets confused by our odd version
	# number.
	ln $(docdir)/changelog $(docdir)/changelog.Debian

override_dh_gencontrol:
	dh_gencontrol -- -v$(VERSION)+$(SHIM_VERSION) \
		-Vshim:Version=$(SHIM_VERSION)
