#!/usr/bin/make -f

override_dh_auto_configure:
	dh_auto_configure -- --disable-libunwind --libexec=/usr/lib/weston \
		--with-cairo=image

override_dh_auto_test:
	# the test suite does not 100% pass in headless mode
	dh_auto_test || true

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_install:
	dh_install --fail-missing -X.la

override_dh_makeshlibs:
	# No-op: libraries are private, not shared.

override_dh_fixperms:
	dh_fixperms -Xusr/bin/weston-launch

%:
	dh $@ --with quilt,autoreconf

# 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
