#!/usr/bin/make -f

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

build: build-stamp
build-stamp:
	dh_testdir
	python setup.py build
	cd docs; make all
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -rf build-stamp build
	dh_clean examples/mini-yoman/LICENSE \
		 *.log *.aux *.pyc gtkmvc/*.pyc \
		 gtkmvc/adapters/*.pyc gtkmvc/support/*.pyc
	cd docs; make distclean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	python setup.py install --prefix $(CURDIR)/debian/tmp/usr

binary-arch: build install

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs -k NEWS
	dh_install --sourcedir=debian/tmp
	dh_installexamples -p python-gtkmvc-doc examples/*
	dh_pysupport
	dh_link
	dh_compress --exclude=examples --exclude=*.pdf
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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