#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with systemd

override_dh_auto_clean:
	[ ! -f config.mk ] || dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure -- --prefix= --libexecdir=/lib/dhcpcd \
		--mandir=/usr/share/man --dbdir=/var/lib/dhcpcd5 \
		--with-hooks="ntp wpa_supplicant" --host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE)

override_dh_installinit:
	dh_installinit --name=dhcpcd --no-start

override_dh_systemd_enable:
	dh_systemd_enable --name=dhcpcd

override_dh_install:
	dh_install
	mv debian/dhcpcd5/sbin/dhcpcd debian/dhcpcd5/sbin/dhcpcd5
	mv debian/dhcpcd5/usr/share/man/man8/dhcpcd.8 \
		debian/dhcpcd5/usr/share/man/man8/dhcpcd5.8
