#!/usr/bin/make -f

override_dh_auto_configure:
	dh_auto_configure -- -DQTGSTREAMER_STATIC=OFF \
	                     -DQTGSTREAMER_TESTS=ON \
	                     -DQTGSTREAMER_EXAMPLES=OFF \
	                     -DGST_PACKAGE_NAME="QtGStreamer (Debian)" \
	                     -DGST_PACKAGE_ORIGIN="http://packages.qa.debian.org/qt-gstreamer"

override_dh_auto_build:
	dh_auto_build --parallel -- all doc

override_dh_auto_install:
	dh_auto_install --parallel
	cp -r obj-`dpkg-architecture -qDEB_HOST_GNU_TYPE`/doc debian/tmp/doc

override_dh_gencontrol:
	mkdir -p debian/fake-home
	HOME=debian/fake-home \
	LD_LIBRARY_PATH=debian/qtgstreamer-plugins/usr/lib:$(LD_LIBRARY_PATH) \
	    dh_gstscancodecs
	rm -rf debian/fake-home
	dh_gencontrol

%:
	dh $@ --parallel --dbg-package=qtgstreamer-dbg
