#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-DDBUS_CONFIG_FILENAME=plasmalogin_org.freedesktop.DisplayManager.conf \
		-DPAM_OS_CONFIGURATION=debian \
		-DSESSION_COMMAND=/etc/plasmalogin/Xsession

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_installsystemd:
	# Never start or restart the display manager from maintainer scripts.
	dh_installsystemd -pplasma-login-manager --no-start plasmalogin.service

execute_after_dh_fixperms-arch:
	# dh_fixperms strips the executable bit from files below /etc
	chmod +x debian/plasma-login-manager/etc/plasmalogin/Xsession
