#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DDISABLE_WERROR=ON -DHAVE_DOT=YES \
	                     -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"

ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
override_dh_auto_build:
	dh_auto_build --parallel
	dh_auto_build -- doxygen-doc
endif

# Do not run tests, as they fall into race conditions sometimes
override_dh_auto_test:

override_dh_strip:
	dh_strip --dbg-package=libtelepathy-qt4-dbg

override_dh_install:
	dh_install --list-missing

# -i is for the doc package, which doesn't depend on the shared library
override_dh_installdocs:
	dh_installdocs -a --link-doc=libtelepathy-qt4-2
	dh_installdocs -i
	rm -f debian/libtelepathy-qt4-doc/usr/share/doc/libtelepathy-qt4-doc/html/jquery.js
