#!/usr/bin/make -f

# uncomment for verbose output
#export DH_VERBOSE=1

XP=xsltproc --nonet --novalid
DB2MAN=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl


%:
	dh $@ --with python2

override_dh_auto_build:
	# build the manpage
	$(XP) $(DB2MAN) debian/xhtml2pdf.dbk
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	# /usr/bin/xhtml2pdf and /usr/bin/pisa are the same thing,
	# let's only install the one, that is documented
	rm debian/python-pisa/usr/bin/pisa

override_dh_clean:
	-rm xhtml2pdf.1
	dh_clean

override_dh_installexamples:
	dh_installexamples
	# remove useless MacOSX resource fork file
	rm debian/python-pisa/usr/share/doc/python-pisa/examples/djangoproject/._views.py
