#!/usr/bin/make -f

ifeq "$(DEB_BUILD_ARCH)" "armhf"
	EXTRA_OPTIONS = -Dgl_winsys=x11,gbm,wayland
endif

%:
	dh $@ -Smeson --with quilt,gir

override_dh_auto_configure:
	dh_auto_configure -- \
	--default-library shared \
	-Dpackage-name="GStreamer Base Plugins (Marillat/DMO)" \
	-Dpackage-origin="https://www.deb-multimedia.org/" \
	-Dinstall_plugins_helper="/usr/bin/gstreamer-codec-install" \
	$(EXTRA_OPTIONS)

#	exit 1

override_dh_auto_install:
	dh_auto_install

	dh_gstscancodecs

override_dh_auto_test:
ifneq (,$(filter $(DEB_BUILD_ARCH), amd64 arm64))
	xvfb-run dh_auto_test
else
	xvfb-run dh_auto_test || true
endif
