#!/usr/bin/make -f
%:
	dh $@

build:
	# Disable anything needing the network when building.
	# This won't fully exersise the test suite; some tests need to be
	# online to download the Debian keyring, for example. Recommend
	# running make test by hand from time to time to fully test it.
	# (Note that the full test suite is run by the review script before
	# changesets are added.)
	ONLINE=n dh build 

VER = $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')

binary-indep: build
	dh binary-indep --until dh_prep
	dh_installdocs README TODO
	dh_installexamples sample.changeset
	dh_install debian-maintainers.gpg usr/share/keyrings/
	dh binary-indep --remaining
	
	# byhand file for dak
	cp debian-maintainers.gpg ../debian-maintainers_$(VER)_all.gpg
	dpkg-distaddfile debian-maintainers_$(VER)_all.gpg raw-keyring -

binary: binary-indep binary-arch
