#!/usr/bin/make -f
PYVERS=2.4
PYMODULE=django

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

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

python=python$(PYVERS)
pythonbin=/usr/bin/$(python)
package=$(python)-$(PYMODULE)
instroot=debian/$(package)

build: build-stamp
	$(pythonbin) setup.py build
build-stamp:
	dh_testdir
	touch build-stamp

configure:
	# Do nothing

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	-rm -rf build

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	$(pythonbin) setup.py install --no-compile --root=$(instroot)

# Build architecture-independent files here.
binary-indep: install
	dh_testdir
	dh_testroot

	dh_installman
	dh_installdocs
	dh_installchangelogs
	dh_compress -X.py
	dh_fixperms
	dh_python -V $(PYVERS)
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb
# We have nothing to do by default.

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