Skip to content
Snippets Groups Projects
Commit 6f0e2416 authored by Thomas Goirand's avatar Thomas Goirand
Browse files

* Use git to generate upstream tarball, as the PyPi module doesn't include

    the test folder. Using the gen-orig-xz in debian/rules, as using the
    repack function of debian/watch doesn't make sense (why downloading a
    tarball that would be later on discarded? I'm open to a better solution
    which would be uscan compatible though...). Switch d/watch to the github
    tag therefore.
parent 76175a9c
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,12 @@ python-kubernetes (12.0.1-1) unstable; urgency=medium
[ Thomas Goirand ]
* New upstream release.
* Use git to generate upstream tarball, as the PyPi module doesn't include
the test folder. Using the gen-orig-xz in debian/rules, as using the
repack function of debian/watch doesn't make sense (why downloading a
tarball that would be later on discarded? I'm open to a better solution
which would be uscan compatible though...). Switch d/watch to the github
tag therefore.
-- Thomas Goirand <zigo@debian.org> Fri, 20 Nov 2020 09:16:10 +0100
......
......@@ -2,5 +2,30 @@
export PYBUILD_NAME=kubernetes
DEB_PKGNAME := $(shell dpkg-parsechangelog -SSource)
DEB_VERSION := $(shell dpkg-parsechangelog -SVersion)
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
GIT_TAG := $(shell echo '$(DEB_UPSTREAM_VERSION)' | sed -e 's/~/_/')
UPSTREAM_GIT = https://github.com/kubernetes-incubator/client-python
%:
dh $@ --with python3 --buildsystem=pybuild
gen-orig-xz:
set -e ; set -x ; \
cd .. ; \
git clone $(UPSTREAM_GIT) ; \
cd client-python ; \
git reset --hard v$(GIT_TAG) ; \
git tag $(GIT_TAG) v$(GIT_TAG) ; \
git archive --prefix=$(DEB_PKGNAME)-$(GIT_TAG)/ --format=tar $(GIT_TAG) >../$(DEB_PKGNAME)_$(GIT_TAG).orig.tar ; \
git submodule update --init ; \
cd kubernetes/base ; \
git archive --prefix=$(DEB_PKGNAME)-$(GIT_TAG)/kubernetes/base/ --format=tar master > ../../../base.tar ; \
cd ../../.. ; \
tar -Af $(DEB_PKGNAME)_$(GIT_TAG).orig.tar base.tar ; \
rm -rf base.tar client-python ; \
cat $(DEB_PKGNAME)_$(GIT_TAG).orig.tar | xz >$(DEB_PKGNAME)_$(GIT_TAG).orig.tar.xz ; \
rm $(DEB_PKGNAME)_$(GIT_TAG).orig.tar
version=3
opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
https://pypi.debian.net/kubernetes/kubernetes-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
opts="uversionmangle=s/\.(b|rc)/~$1/" \
https://github.com/kubernetes-incubator/client-python/tags .*/v(\d[\d\.]+)\.tar\.gz
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment