#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_install:
	dh_install -a
	cp src/etc/munge.systemd.service debian/munge.service
	cp src/etc/munge.logrotate.conf debian/munge.logrotate

override_dh_auto_configure:
	dh_auto_configure -a -- --with-pkgconfigdir=/usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	make check root=/tmp/munge-test-$$$$ verbose=t VERBOSE=t
endif
