#!/usr/bin/make -f
%:
	dh $@

override_dh_install:
	dh_install
	# 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_strip:
	dh_strip --dbgsym-migration='libcommoncpp2-dbg (<< 1.8.1-7~)'

override_dh_installexamples:
	dh_installexamples
	# Remove Makefile which embeds binary paths and build paths
	rm -f debian/libcommoncpp2-doc/usr/share/doc/libcommoncpp2-dev/examples/Makefile

override_dh_installman:
	dh_installman
	# Remove manpages with embedded build path and content of limited usefulness
	if test -d debian/libcommoncpp2-doc/usr/share/man ; then find debian/libcommoncpp2-doc/usr/share/man -name '_*_inc_*.3' -delete ; fi

help2man:
	/usr/bin/help2man -N -S 'Debian GNU/Linux' -o debian/ccgnu2-config.8 ccgnu2-config \
	    -n 'script to get information about the installed version of libcommoncpp2'
