#!/usr/bin/make -f

export COMMONCPP_CFLAGS=`ucommon-config --cflags`
export COMMONCPP_LIBS=`ucommon-config --libs`

%:
	dh $@ --parallel --with autoreconf

override_dh_install:
	dh_install --list-missing
	# Drop content of dependency_libs to avoid having to recompile
	# if the path of the libs that appear there changes
	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`

override_dh_clean:
	rm -f doc/latex/* doc/html/* doc/man/man3/* doc/doxy
	dh_clean

override_dh_installman:
	dh_installman
	# Remove files with low content and filenames based on the build path.
	# https://bugs.debian.org/860470
	rm -vf debian/libccrtp-doc/usr/share/man/man*/_*
