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

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

override_dh_install:
	dh_install
	sed -i s,@php_bin@,workaround,	debian/pdepend/usr/bin/pdepend

override_dh_installman:
	mkdir -p $(CURDIR)/debian/tmp
	cd $(CURDIR)/debian/pdepend/usr/share/php && \
		help2man --no-info \
		--include=$(CURDIR)/debian/pdepend.1.in \
		$(CURDIR)/debian/pdepend/usr/bin/pdepend \
		> $(CURDIR)/debian/tmp/pdepend.1
	dh_installman

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