#!/usr/bin/make -f

PACKAGE = $(shell dh_listpackages)

configure: configure-stamp
configure-stamp: 
	dh_testdir
	touch $@

build: configure-stamp build-stamp 

build-stamp:
	dh_testdir
	python setup.py build
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -rf build
	rm -rf ez_setup.pyc SPARQLWrapper.egg-info
	dh_clean 

install: build-stamp 
	dh_testdir
	dh_testroot
	python setup.py install --no-compile --root=$(CURDIR)/debian/$(PACKAGE)

binary-arch: build install

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog.txt
	dh_installdocs
	dh_installexamples
	dh_compress
	dh_fixperms
	dh_pysupport
	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
