#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make

PYVERS=$(shell pyversions -r)

build: patch-stamp

clean: unpatch
	dh_testdir
	
	# Add here commands to clean up after the build process.
	for python in $(PYVERS); do \
	   $$python setup.py clean; \
	done
	
	rm -f build-stamp
	rm -f pyPdf/*.pyc pyPdf/*.pyo
	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	
	for python in $(PYVERS); do \
	   $$python setup.py install --root=debian/python-pypdf; \
	done

# Build architecture-dependent files here.
binary-arch:
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs README
	dh_python2
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
