diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8f89ae3 --- /dev/null +++ b/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +# export DH_VERBOSE=1 + +DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//') +DEBFLAVOR :=$(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2) +DEBPKGNAME :=$(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2) + +%: + dh $@ --with python2 + +get-vcs-source: + git remote add upstream git://github.com/rbarrois/factory_boy.git || true + git fetch upstream + if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \ + git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \ + fi + if ! git checkout master ; then \ + echo "No upstream branch: checking out" ; \ + git checkout -b master upstream/master ; \ + fi + git checkout debian/experimental |