#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with openrc,runit

override_dh_auto_configure:
	dh_auto_configure -- \
		--privsepuser=dhcpcd \
		--dbdir=/var/lib/dhcpcd \
		--libexecdir=/usr/lib/dhcpcd \
		--rundir=/run/dhcpcd \
		--with-openssl \
		--with-hooks="timesyncd.conf"

# Avoid starting the unconfigured service as it may break connectivity.
# simple-netaid manages networking; dhcpcd stays disabled (see .openrc).
override_dh_installinit:
	dh_installinit --name=dhcpcd --no-scripts

override_dh_installsystemd:
	: