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

override_dh_auto_configure:
	find . -name "*_vala.stamp" | xargs rm -f
	./configure --prefix=/usr --mandir=\$${prefix}/share/man \
		--sysconfdir=/etc \
		--enable-mediathek-plugin \
		--enable-gst-launch-plugin \
		LDFLAGS="$(LDFLAGS) -Wl,-z,defs -Wl,--as-needed" \
		CFLAGS="$(CFLAGS)"

override_dh_strip:
	dh_strip --dbg-package=rygel-dbg

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

override_dh_install:
	dh_install --list-missing

# kfreebsd is fubar and noone around to remove the existing kfreebsd binary
# packages (see #711947). Just continue shipping it broken for now....
# This makes test-suite failures non-fatal on kfreebsd.
ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
override_dh_auto_test:
	dh_auto_test || true
endif

