#! /usr/bin/make -f

pkgs_lib := $(filter-out %-dev %-dbg,$(filter lib%,$(shell dh_listpackages)))
current_version := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')

override_dh_install:
	dh_install --list-missing

override_dh_strip:
	dh_strip --dbg-package=libsmokeqt4-dbg

override_dh_makeshlibs:
	dh_makeshlibs -V
# Generate shlibs local files
	for pkg in $(pkgs_lib); do \
		if test -e debian/$${pkg}/DEBIAN/shlibs ; then \
			sed 's/>=[^)]*/= $(current_version)/' debian/$${pkg}/DEBIAN/shlibs >> debian/shlibs.local ;\
		fi \
	done

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/shlibs.local

#Build-Depend on pkg-kde-tools (>= 0.6.8) for the sodeps addon
%:
	dh $@ --parallel --with sodeps
