#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for spice-vdagent

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)

override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_auto_configure:
	dh_auto_configure -- \
		    --with-init-script=systemd \
		    --enable-pie=yes \
                    --with-session-info=console-kit \
		    --with-gtk4=yes
%:
	dh $@

execute_after_dh_install:

uninstall-systemd:
	rm -f $(DESTDIR)$(SYSTEMDUSERUNITDIR)/graphical-session.target.wants/spice-vdagent.service
