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