#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=4

# The versions of python currently supported
PYVERS = 2.1 2.2 2.3

build: build-stamp
build-stamp: $(PYVERS:%=build-python%)
	touch $@
build-python%:
	python$* setup.py build

configure:

clean:
	dh_testdir
	dh_testroot
	rm -f *-stamp
	rm -rf compile build
	find -name '*.py[co]' -exec rm -f {} \;
	dh_clean

install: build install-prereq $(PYVERS:%=install-python%)

install-prereq:
	dh_testdir
	dh_testroot
	dh_clean -k

install-python%:
	python$* setup.py install --root `pwd`/debian/python$*-medusa
	find debian/python$*-medusa -name '*.py[co]' -exec rm -f {} \;
	mkdir -p debian/python$*-medusa/usr/include/python$*

# Build architecture-independent files here.
binary-indep: install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installchangelogs -i
	dh_python -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i 
	dh_builddeb -i

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