#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc --enable-introspection

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:
	dh_install
	# Only install udev rules on Linux architectures. The
	# directory doesn't even exist on e.g. GNU/kFreeBSD
ifeq ($(DEB_HOST_ARCH_OS),linux)
	dh_install -pupower debian/tmp/lib/udev/rules.d/
endif

override_dh_shlibdeps:
	dh_shlibdeps
	dh_girepository -plibupower-glib1

override_dh_makeshlibs:
	dh_makeshlibs -- -c4
