#!/usr/bin/make -f

%:
	dh $@ --buildsystem=phppear --with phppear

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=phppear
	sed -i -r -e '/(LICENCE|README|CONTRIBUTING)/d' \
		-e '/" role="doc" /d' \
		-e 's/pre-commit" role="script"/pre-commit" role="doc"/' */package.xml

override_dh_auto_test:
ifeq (,$(filter nocheck stage1, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	cd PHP_CodeSniffer-*/tests && \
		phpunit -d include_path=".:/usr/share/php:.." AllTests.php
else
	@echo "** tests disabled"
endif

get-orig-source:
	uscan --verbose --rename --force
