#!/usr/bin/make -f

%:
	dh $@ --with python2 --buildsystem=python_distutils --no-guessing-deps

override_dh_auto_install:
	dh_auto_install
	dh_install --list-missing

DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
REV=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
              | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p')
VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
              | sed -rne 's,^Version: ([^-]+).*,\1,p')
get-orig-source:
	bzr export -r $(REV) --root=txlongpoll-$(VER).orig \
             txlongpoll_$(VER).orig.tar.gz lp:txlongpoll
