#!/usr/bin/make -f

override_dh_auto_configure:
	dh_auto_configure -- -Dscreenshare=true \
		-Dsystemd=true

override_dh_auto_test:
	mkdir -p $(CURDIR)/debian/tmp/tmp/xdgruntimedir
	XDG_RUNTIME_DIR=$(CURDIR)/debian/tmp/tmp/xdgruntimedir dh_auto_test || true

override_dh_missing:
	dh_missing --fail-missing -X.la

override_dh_makeshlibs:
	dh_makeshlibs -Xlibweston-13/ -- -c4 -ldebian/weston/usr/lib/$(DEB_TARGET_MULTIARCH)/weston/

override_dh_shlibdeps:
	dh_shlibdeps -O--buildsystem=meson -- -ldebian/weston/usr/lib/$(DEB_TARGET_MULTIARCH)/weston/

%:
	dh $@ --buildsystem=meson

# For maintainer use only, generate a tarball:
gentarball: SOURCE=$(shell dpkg-parsechangelog|awk '/^Source:/ {print $$2}')
gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
gentarball:
	git archive --format=tar upstream-unstable --prefix=$(SOURCE)-$(UV)/ | gzip -9 > ../$(SOURCE)_$(UV).orig.tar.gz
