#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with sysuser

# Run configure.
#
# We want to be explicit about the user the daemon will run as, even
# though it matches the default, in case upstream changes their mind
# about the name at some point in the future.
override_dh_auto_configure:
	dh_auto_configure -- \
	                  --with-system-user=libvirtdbus

# Install files.
#
# We use debian/tmp as a staging area so that we can have full control
# over what exactly ends up in the package.
override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
	# polkit 105 compatibility
	install -m 0755 -d \
	        debian/tmp/var/lib/polkit-1/localauthority/10-vendor.d/
	install -m 0644 \
	        debian/polkit/libvirt-dbus.pkla \
	        debian/tmp/var/lib/polkit-1/localauthority/10-vendor.d/
