#!/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 (,$(filter nocheck stage1, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	# Ensure the local class takes precedence
	mkdir --parents SebastianBergmann
	ln -s ../src SebastianBergmann/Comparator
	phpunit
else
	@echo "** tests disabled"
endif
