#!/usr/bin/make -f
# -*- makefile -*-

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

export DPKG_GENSYMBOLS_CHECK_LEVEL=4

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	TESTS=yes
else
	TESTS=no
endif

%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	NOCONFIGURE=1 dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- --enable-tests=$(TESTS)

override_dh_install:
	find debian/indicator-power -name \*.la -delete
	find debian/indicator-power -name \*.a -delete
	dh_install --fail-missing
	mkdir -p debian/indicator-power/usr/share/apport/package-hooks/
	cp debian/source_indicator-power.py debian/indicator-power/usr/share/apport/package-hooks/
