#!/usr/bin/make -f

%:
	dh $@ -Dexternal --buildsystem=pd_lib_builder

override_dh_auto_install:

ABLETONLINK_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' ableton-link-dev)
override_dh_gencontrol:
	dh_gencontrol -- \
                -Vsrc:BuiltUsing="ableton-link ( = $(ABLETONLINK_VERSION) )"

DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
	debian/.*
# licensecheck v1
.PHONY: licensecheck
licensecheck:
	LANG=C.UTF-8 licensecheck \
		-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
		--check '.*' --recursive --deb-machine --lines 0 * \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints
