#!/usr/bin/make -f

%:
	dh $@ --with gir

autoreconf:
	gtkdocize --copy
	autopoint --force
	autoreconf --force --install --verbose

override_dh_autoreconf:
	dh_autoreconf debian/rules -- autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-gtk-doc \
		--enable-introspection \
		--with-systemdutildir=/lib/systemd \
		--with-systemdsystemunitdir=/lib/systemd/system \
		--libexecdir=\$${prefix}/lib/upower

override_dh_auto_build:
	dh_auto_build
	make -C po upower.pot

override_dh_auto_test:
	# test suite needs system D-BUS and thus does not work on buildds

override_dh_install:
	find debian/tmp -name '*.la' -print -delete
	dh_install

override_dh_missing:
	dh_missing --fail-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_systemd_enable:
	dh_systemd_enable --no-enable
