#!/usr/bin/make -f

-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with gnome

export DEB_LFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

override_dh_auto_configure:
	find . -name "*_vala.stamp" | xargs rm -f
	dh_auto_configure -- \
		--libdir=/usr/lib \
		--libexecdir=/usr/lib \
		--with-systemduserunitdir=/usr/lib/systemd/user \
		--enable-mediathek-plugin \
		--enable-gst-launch-plugin \
		--disable-lms-plugin \
		--disable-apidocs

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_strip:
	dh_strip --dbgsym-migration='rygel-dbg (<< 0.28.3-2~)'

override_dh_makeshlibs:
	dh_makeshlibs -X /usr/lib/rygel-2.6/

override_dh_install:
	find . -name '*.la' | xargs rm -f
	dh_install --fail-missing

