#!/usr/bin/make -f %: dh $@ include /usr/share/dpkg/pkg-info.mk SOURCEPKG=$(DEB_SOURCE) UPSTREAM=$(DEB_VERSION_UPSTREAM) SHA1=$(lastword $(subst ~g, ,$(UPSTREAM))) ORIG=${SOURCEPKG}_${UPSTREAM}.orig.tar.gz describe-current-version: git describe --tags master | sed 's,^v,,;s,-,+,;s,-,~,;' get-orig-source: git archive --format=tar $(SHA1) | gzip -9 > ../$(ORIG)