#!/usr/bin/make -f

VERSION = 1.0.1+20101115
TARBALL = ttb_$(VERSION).orig.tar.gz
GITURL  = git://gitorious.org/ttb/mainline.git
GITREV  = v1.0.1-5-gd6b60a8

%:
	dh $@ --with=python2

# Adapted from http://wiki.debian.org/SandroTosi/Svn_get-orig-source
get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	git clone -q $(GITURL) get-orig-source/ttb-$(VERSION).orig
	cd get-orig-source/ttb-$(VERSION).orig && git checkout -q ${GITREV}
	GZIP='--best --no-name' \
	tar czf $(TARBALL) --exclude-vcs -C get-orig-source ttb-${VERSION}.orig
	rm -rf get-orig-source

.PHONY: get-orig-source
