#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs -Wl,--as-needed

%:
# We need to force the build system to autoconf otherwise for some reasons it
# tries to run the python_distutils one
	dh $@ --buildsystem=autoconf --with gnome,python3

override_dh_auto_configure:
	dh_auto_configure -- --with-udev-rules \
		             --with-udevdir=/lib/udev \
		             --with-systemdsystemunitdir=/lib/systemd/system

override_dh_python3:
	dh_python3 -ppython3-cupshelpers
	dh_python3 -psystem-config-printer /usr/share/system-config-printer/
	dh_python3 -psystem-config-printer-common /usr/share/system-config-printer/

override_dh_autoreconf:
	dh_autoreconf ./bootstrap

override_dh_clean:
	dh_clean -O--buildsystem=autoconf
	rm -f dbus/org.fedoraproject.Config.Printing.service
