#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-glib --enable-ecore \
	                     --enable-doxygen-docs

override_dh_install:
	# Install documentation:
	# Upstream dumps everything generated by doxygen into a tarball,
	# so we need to untar it and install everything into the right place
	tar xjf $(CURDIR)/libdbus-c---$(DEB_VERSION_UPSTREAM)-doc.tar.bz2
	mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/libdbus-c++-doc/
	mv libdbus-c---$(DEB_VERSION_UPSTREAM)-doc/* \
	   $(CURDIR)/debian/tmp/usr/share/doc/libdbus-c++-doc/
	
	dh_install

override_dh_strip:
	dh_strip --dbg-package=libdbus-c++-dbg
