#!/usr/bin/make -f

export trusted_keyid=10613B9B21177FF0378081BABD8205930270C1A5
export GNUPGHOME=$(CURDIR)/debian/tmp

%:
	dh $@

override_dh_auto_build:
	# check GPG sig for sha512sums and sha512sums for gpg keys
	mkdir -p $(CURDIR)/debian/tmp
	gpg --no-default-keyring \
	    --keyring /usr/share/keyrings/debian-keyring.gpg \
	    --trusted-key $(trusted_keyid) \
	    --no-auto-check-trustdb \
	    --decrypt $(CURDIR)/SHA512SUMS.txt.asc > $(CURDIR)/debian/tmp/SHA512SUMS.txt
	sha512sum -c $(CURDIR)/debian/tmp/SHA512SUMS.txt

override_dh_installchangelogs:
	dh_installchangelogs -Xchangelog
