#!/usr/bin/make -f

# Install in debian/tmp to retain control through dh_install:
override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_install:
	find debian/tmp -name '*.la' -delete
	dh_install --fail-missing

override_dh_strip:
	dh_strip -plibwacom2 --dbg-package=libwacom2-dbg
	dh_strip -plibwacom-bin

get-orig-source: SOURCE=libwacom
get-orig-source: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
get-orig-source:
	git archive --format=tar upstream --prefix=$(SOURCE)-$(UV)/ \
	    | xz --best > ../$(SOURCE)_$(UV).orig.tar.xz

%:
	dh $@ --with autoreconf --builddirectory=build/
