#!/usr/bin/make -f
%:
	dh $@ --with phpcomposer

override_dh_auto_build:
	phpab	--output src/autoload.php \
		--template debian/autoload.php.tpl \
		src
	dh_auto_build

override_dh_auto_clean:
	rm -rf SebastianBergmann
	dh_auto_clean

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	# Ensure the local class takes precedence
	mkdir --parents SebastianBergmann
	ln -s ../src SebastianBergmann/Comparator
	phpunit
else
	@echo "** tests disabled"
endif
