| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
UPSTREAM_GIT = https://github.com/jeresig/jquery.hotkeys |
| 4 |
DEBVERS ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') |
| 5 |
VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//') |
| 6 |
DEBFLAVOR ?= $(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2) |
| 7 |
DEBPKGNAME ?= $(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2) |
| 8 |
GIT_TAG ?= $(shell echo '$(VERSION)' | sed -e 's/~/_/') |
| 9 |
MANIFEST_EXCLUDE_STANDARD ?= $(DEBPKGNAME) |
| 10 |
DEBIAN_BRANCH ?= $(shell cat debian/gbp.conf | grep debian-branch | cut -d'=' -f2 | awk '{print $1}') |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
fetch-upstream-remote: |
| 16 |
git remote add upstream $(UPSTREAM_GIT) || true |
| 17 |
git fetch upstream |
| 18 |
|
| 19 |
gen-orig-xz: |
| 20 |
if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \ |
| 21 |
git archive --prefix=$(DEBPKGNAME)-$(GIT_TAG)/ $(GIT_TAG) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \ |
| 22 |
fi |
| 23 |
[ ! -e ../build-area ] && mkdir ../build-area || true |
| 24 |
[ ! -e ../build-area/$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] && cp ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ../build-area |
| 25 |
|
| 26 |
get-master-branch: |
| 27 |
if ! git checkout master ; then \ |
| 28 |
echo "No upstream branch: checking out" ; \ |
| 29 |
git checkout -b master upstream/master ; \ |
| 30 |
fi |
| 31 |
git checkout $(DEBIAN_BRANCH) |