#!/usr/bin/make -f

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	rm -rf $(CURDIR)/build
	rm -f $(CURDIR)/zeroinstall/__init__.pyc
	dh_clean 

build-stamp:
	dh_testdir
	python $(CURDIR)/setup.py build
	touch $@

install: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	python $(CURDIR)/setup.py install --install-layout=deb --root=$(CURDIR)/debian/zeroinstall-injector
	rm -r $(CURDIR)/debian/zeroinstall-injector/usr/man

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installman 0launch.1 0alias.1 0store.1 0store-secure-add.1 0desktop.1 0install.1
	dh_compress
	dh_fixperms
	dh_python2
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch

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