#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_OPTIONS=-v

%:
	dh $@ --with dist-zilla,apport

execute_after_dh_installinit:
	dh_installsysusers

# Due to the presence of amavisd-new-postfix - which is empty except postinst
# magic - this is needed to behave as expected by other parts of the build
override_dh_auto_install:
	dh_auto_install -D .build/debian-build --destdir=debian/amavisd-new

execute_after_dh_auto_install:
	mv debian/amavisd-new/usr/bin debian/amavisd-new/usr/sbin

override_dh_installsystemd:
	dh_installsystemd --name=amavis --no-start
	dh_installsystemd --name=amavis-mc --no-start --no-enable
	dh_installsystemd --name=amavisd-snmp-subagent --no-start --no-enable
	dh_installinit --name=amavis --no-start
	dh_installinit --name=amavis-mc --no-start --no-enable
	dh_installinit --name=amavisd-snmp-subagent --no-start --no-enable

override_dh_installchangelogs:
	dh_installchangelogs -k RELEASE_NOTES
