#!/usr/bin/make -f

include /usr/share/dpatch/dpatch.make

PYVERS=$(shell pyversions -r)
d=debian/python-twitter

build: build-stamp

build-stamp: patch-stamp

clean:  unpatch
	dh_testdir
	python setup.py clean;
	rm -rf build-stamp build
	rm -rf $(d)
	dh_clean install-stamp

install: build install-stamp
install-stamp:
	dh_testdir
	dh_testroot
	dh_installdirs
	python setup.py install --root=$(d);

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs 
	dh_installchangelogs CHANGES
	dh_installman
	dh_compress -X.py
	install -m 755 $(CURDIR)/examples/tweet.py $(CURDIR)/$(d)/usr/bin/tweet
	install -m 755 $(CURDIR)/examples/twitter-to-xhtml.py $(CURDIR)/$(d)/usr/bin/twitter-to-xhtml
	dh_fixperms
	dh_pysupport
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:

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

