#!/usr/bin/make -f

include /usr/share/pkg-kde-tools/qt-kde-team/2/debian-qt-kde.mk

# Enable strict interdependencies
libpkgs_gen_strict_local_shlibs = $(libpkgs_all_packages)
include /usr/share/pkg-kde-tools/qt-kde-team/2/library-packages.mk

RECOMMENDED_PHONON4_QT5_BACKEND := phonon4qt5-backend-vlc

override_dh_gencontrol:
	# Expand some variables in maintainer scripts and debconf templates
	@for f in debian/*/DEBIAN/post* \
	          debian/*/DEBIAN/pre* \
	          debian/*/DEBIAN/config \
	          debian/*/DEBIAN/templates; do \
	    if [ -f "$$f" ]; then \
	        cmd="awk -f debian/expand_vars.awk -v recommended4qt5_backend='$(RECOMMENDED_PHONON4_QT5_BACKEND)' -- $$f > $$f.tmp && cat $$f.tmp >| $$f && rm -f $$f.tmp"; \
	        echo "$$cmd"; eval "$$cmd"; \
	    fi; \
	done
	$(overridden_command) -- -Vphonon:Recommended-Backend-qt5=$(RECOMMENDED_PHONON4_QT5_BACKEND)
