#!/usr/bin/make -f

%:
	dh $@ --with phpcomposer -XREADME.markdown

override_dh_install:
	mkdir $(CURDIR)/debian/tmp
	cp $(CURDIR)/bin/doctrine-pear.php $(CURDIR)/debian/tmp/doctrine.php
	dh_install --list-missing

override_dh_installman:
	cd $(CURDIR)/lib && \
		help2man --help-option=\  --no-info \
		--name='Doctrine command line interface' \
		"php $(CURDIR)/bin/doctrine-pear.php" \
		> $(CURDIR)/debian/tmp/doctrine.1
	dh_installman

override_dh_fixperms:
	dh_fixperms
	chmod -x $(CURDIR)/debian/php-doctrine-orm/usr/bin/doctrine.php

override_dh_auto_build:

override_dh_auto_clean:
	rm -rf	tests/Doctrine/Tests/Proxies \
		tests/Doctrine/Tests/ORM/Proxy/generated \
		tests/Doctrine/Tests/ORM/Tools/Export/export

override_dh_auto_test:
	phpunit
	dh_auto_test

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