#!/usr/bin/make -f

DEB_DH_MAKESHLIBS_ARGS_libtelepathy-glib0 := -V"libtelepathy-glib0 (>= 0.7.37)"

include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

# We don't want the .la files, but complain if anything else is missing
binary-post-install/libtelepathy-glib-dev::
	rm -f debian/tmp/usr/lib/*.la
common-binary-post-install-arch:: list-missing

DEB_DH_STRIP_ARGS := --dbg-package=libtelepathy-glib0-dbg

DEB_MAKE_CHECK_TARGET := check
DEB_CONFIGURE_EXTRA_FLAGS := \
	--disable-Werror \
	--enable-gtk-doc \
	--with-html-dir=\$${prefix}/share/doc/libtelepathy-glib-doc

export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

# we symlink many of the doc directories together
DEB_INSTALL_DOCS_libtelepathy-glib0-dbg := --no-act
DEB_INSTALL_CHANGELOGS_libtelepathy-glib0-dbg := --no-act
DEB_INSTALL_DOCS_libtelepathy-glib-dev := --no-act
DEB_INSTALL_CHANGELOGS_libtelepathy-glib-dev := --no-act

include $(CURDIR)/debian/update-patches.mk

common-binary-arch:: mangle-pc-file

mangle-pc-file:
	# Maemo pkgconfig seems to fail at Requires.private
	python debian/mangle-pc-file.py debian/tmp/usr/lib/pkgconfig/telepathy-glib.pc

# OSSO-specific changes
include debian/osso-specific-rules.mk
