#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

PYTHON22:=python2.2
PYTHON23:=python2.3
PYTHON24:=python2.4
PYTHON25:=python2.5

PYTHON:=python2.3

installdetect:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/photon.
	$(PYTHON) setup.py config
	$(PYTHON) setup.py build
	$(PYTHON) setup.py install --prefix $(CURDIR)/debian/photon/usr
	rm -f $(CURDIR)/debian/photon/usr/lib/$(PYTHON)/site-packages/Photon/*.pyc 

install23:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/photon.
	$(PYTHON23) setup.py config
	$(PYTHON23) setup.py build
	$(PYTHON23) setup.py install --prefix $(CURDIR)/debian/$(PYTHON23)-photon/usr
	rm -f $(CURDIR)/debian/$(PYTHON23)-photon/usr/lib/$(PYTHON23)/site-packages/Photon/*.pyc 

install24:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/photon.
	$(PYTHON24) setup.py config
	$(PYTHON24) setup.py build
	$(PYTHON24) setup.py install --prefix $(CURDIR)/debian/$(PYTHON24)-photon/usr
	rm -f $(CURDIR)/debian/$(PYTHON24)-photon/usr/lib/$(PYTHON24)/site-packages/Photon/*.pyc 


install: installdetect


# Build architecture-dependent files here.
binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
#	dh_installmenu
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_python
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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