#!/usr/bin/make -f
# -*- makefile -*-

%:
	dh $@ --with python2

get-orig-source:
	set -e ; \
	hg clone https://hg.edgewall.org/trac/mercurial-plugin; \
	VERSION=$$(python mercurial-plugin/setup.py --version) ; \
	cd mercurial-plugin/ ;\
	REVISION=$$( LANG=C hg tip | grep changeset | cut -d":" -f3) ; \
	cd .. ; \
	find mercurial-plugin/ -iname "*pyc" -exec rm {} \; ; \
	rm -rf mercurial-plugin/.hg ; \
	tar cfz trac-mercurial_$$VERSION+hg$$REVISION.orig.tar.gz mercurial-plugin/ ; \
	rm -rf mercurial-plugin/ ;
