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

# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1):
# - https://wiki.debian.org/Hardening#dpkg-buildflags

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# we disable runit in configure.ac, leaving dh-runit to do the job
CONFFLAGS = \
	--prefix=/usr \
	--disable-runit \
	--disable-silent-rules

CONFFLAGS_deb = \
	--disable-manpages

%:
	dh $@ --with runit

override_dh_auto_configure:
	dh_auto_configure \
		-- $(CONFFLAGS) $(CONFFLAGS_deb)
