#!/usr/bin/make -f

PYVERS  = $(shell pyversions -vs)

%:
	dh $@ --buildsystem=python_distutils --with=python2 

build-python%:
	python$* setup.py build

override_dh_auto_build: $(PYVERS:%=build-python%)
	dh_auto_build

install-python%:
	python$* setup.py install \
        --root=$(CURDIR)/debian/tmp \
        --prefix=/usr --install-layout=deb

override_dh_auto_install: $(PYVERS:%=install-python%)
	dh_auto_install

override_dh_installdocs:
	dh_installdocs -Npython-thrift-dbg

override_dh_installchangelogs:
	dh_installchangelogs -Npython-thrift-dbg

override_dh_strip:
	dh_strip -ppython-thrift --dbg-package=python-thrift-dbg
	dh_strip -Npython-thrift

get-orig-source:
	uscan --rename --force-download
