#!/usr/bin/make -f

%:
	dh $@ --with python2

get-orig-source:
	if [ ! -e .git ]; then \
	    echo "ERROR: Require the packaging repository" >&2; \
	    exit 1; \
	fi
	git remote | grep github || git remote add github https://github.com/kbandla/pydeep.git
	git fetch github
	UVER=`git cat-file blob github/master:pydeep.c | sed -n -e '/#define PYDEEP_VERSION/ s/.*"\(.*\)\"/\1/p'`; \
	VERSION="$$UVER+`date +%Y%m%d`"; \
	git archive --format=tar --worktree-attributes \
	    --prefix=python-pydeep-$$VERSION/ github/master \
	    | gzip -c -9 >../python-pydeep_$$VERSION.orig.tar.gz
