#!/usr/bin/make -f

export PYBUILD_INSTALL_ARGS=--init-system=systemd,sysvinit_deb,upstart

%:
	dh $@ --with python3,systemd --buildsystem pybuild

clean:
	debconf-updatepo
	dh $@ --with python3,systemd --buildsystem pybuild

override_dh_auto_test:
	make PYVER=python3 check

override_dh_installinit:
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-init-local
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-config
	dh_installinit --onlyscripts --no-start --no-restart-on-upgrade --name cloud-final

override_dh_systemd_start:
	dh_systemd_start --no-restart-on-upgrade --no-start
