#!/usr/bin/make -f
%:
dh $@ --with python2
DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | sed 's/-[^-]*$$//')
DIR := $(DEB_SOURCE)-$(UPSTREAM_VERSION)
DATE := $(shell echo $(UPSTREAM_VERSION) | sed 's/^.*\.//' | sed 's/^\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)$$/\1-\2-\3/')
get-orig-source:
rm -rf /tmp/$(DIR)
git clone git://gitorious.org/droopy/droopy.git /tmp/$(DIR)
cd /tmp/$(DIR) && git archive --prefix=$(DIR)/ $$(git rev-list -n 1 --before=$(DATE) master) | xz -c > $(CURDIR)/../$(DEB_SOURCE)_$(UPSTREAM_VERSION).orig.tar.xz
|