#!/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_installchangelogs:
	dh_installchangelogs debian/upstream/changelog

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 \
		$(CURDIR)/debian/php-doctrine-orm/usr/share/php/Doctrine/ORM/Tools/Pagination/Paginator.php

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