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
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
DEBVERS ?= $(shell dpkg-parsechangelog -SVersion)
VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//')
DEBFLAVOR ?= $(shell dpkg-parsechangelog -SDistribution)
DEBPKGNAME ?= $(shell dpkg-parsechangelog -SSource)
UPSTREAM_GIT ?= https://github.com/openstack/$(DEBPKGNAME).git
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}')
export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1)
# Parse version from debian changelog (or pbr will try to use Git commit)
export PBR_VERSION=$(DEB_VERSION_UPSTREAM)
export PYBUILD_NAME=jeepyb
export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/jeepyb
VER_PARSED=$(shell echo 20170923|awk -F '' '{printf $$1$$2$$3$$4 "-" $$5$$6 "-" $$7$$8}')
%:
dh $@ --with python3 --buildsystem=pybuild
get-orig-source:
git clone https://github.com/openstack-infra/jeepyb.git $(PYBUILD_NAME)-$(DEB_VERSION_UPSTREAM)
(cd $(PYBUILD_NAME)-$(DEB_VERSION_UPSTREAM) && git checkout `git rev-list -n 1 --before="$(VER_PARSED) 23:59" master`)
tar czvf ../$(PYBUILD_NAME)_$(DEB_VERSION_UPSTREAM).orig.tar.gz $(PYBUILD_NAME)-$(DEB_VERSION_UPSTREAM)/*
rm -rf $(PYBUILD_NAME)-$(DEB_VERSION_UPSTREAM)
|