#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
	dh $@

override_dh_auto_configure:
	# nothing — cargo no usa configure

override_dh_auto_build:
	$(MAKE)

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/eydos-loginmanager PREFIX=/usr
	$(MAKE) install-smartcast DESTDIR=$(CURDIR)/debian/eydos-smartcast PREFIX=/usr

override_dh_auto_test:
	# sin tests automáticos

override_dh_auto_clean:
	$(MAKE) clean || true

# A display manager that's mid-supervising a greeter (and possibly a live
# user session) must not be torn down mid-upgrade — both children share the
# daemon's systemd cgroup, so the default `dh_installsystemd` behaviour of
# `systemctl restart` on every upgrade kills the greeter and the user
# session along with the daemon. `--no-stop-on-upgrade` keeps prerm from
# stopping the unit; `--no-restart-after-upgrade` keeps postinst from
# restarting it. The new code only takes effect on the next reboot or
# manual `systemctl restart` — which is the right semantics for a DM.
override_dh_installsystemd:
	dh_installsystemd --no-stop-on-upgrade --no-restart-after-upgrade
