#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_clean:
	rm -f pesign-cert.x509
	dh_auto_clean

override_dh_auto_build:
	if test -e ../SOURCES/_projectcert.crt; then \
		openssl x509 -inform PEM -in ../SOURCES/_projectcert.crt \
		-outform DER -out pesign-cert.x509; \
	fi
	dh_auto_build

override_dh_install:
	dh_install
	if test -e pesign-cert.x509; then \
		dh_install -p pesign-obs-integration pesign-cert.x509 /usr/lib/rpm/pesign; \
	fi

override_dh_auto_test:
	shellcheck dh_signobs
