#!/usr/bin/make -f

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

# QMF environment variables should be set
export QMF_INCLUDEDIR := /usr/include/qtopiamail
export QMF_LIBDIR := /usr/lib

%:
	dh $@ --parallel --list-missing --dbg-package=qtmobility-dbg --with pkgkde_symbolshelper

override_dh_auto_configure:
	./configure \
	    -prefix "/usr" \
	    -headerdir "/usr/include" \
	    -libdir "/usr/lib" \
	    -bindir "/usr/bin" \
	    -plugindir "/usr/lib/qt4/plugins" \
	    -examples \
	    -modules "location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors"

override_dh_auto_clean:
	dh_auto_clean
	rm -f \
	    .qmake.cache \
	    config.tests/networkmanager/networkmanager \
	    config.tests/qmf/qmf \
	    tools/tools.pro.user
	find \( -false \
	    -o -type f -name Makefile \
	    -o -type f -name \*.o \
	    -o -type f -name config.\* \
	    -o -type f -name mobility\*.prf \
	\) -delete
	rm -rf include libs libs
