Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 PYTHON3S:=$(shell py3versions -vr)
5
6 DEBVERS ?= $(shell dpkg-parsechangelog -SVersion)
7 VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//')
8 DEBFLAVOR ?= $(shell dpkg-parsechangelog -SDistribution)
9 DEBPKGNAME ?= $(shell dpkg-parsechangelog -SSource)
10 UPSTREAM_GIT ?= https://github.com/andrix/python-snappy
11 GIT_TAG ?= $(shell echo '$(VERSION)' | sed -e 's/~/_/')
12 MANIFEST_EXCLUDE_STANDARD ?= $(DEBPKGNAME)
13 DEBIAN_BRANCH ?= $(shell cat debian/gbp.conf | grep debian-branch | cut -d'=' -f2 | awk '{print $1}')
14
15 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
16
17 %:
18 dh $@ --buildsystem=pybuild
19
20 execute_after_dh_auto_clean:
21 rm -rf build
22 rm -rf python_snappy.egg-info
23
24 override_dh_auto_install:
25 set -e ; for pyvers in $(PYTHON3S); do \
26 python$$pyvers setup.py install --install-layout=deb \
27 --root $(CURDIR)/debian/python3-snappy; \
28 done
29 rm -f $(CURDIR)/debian/python*/usr/lib/python*/dist-packages/*.pth
30
31 gen-orig-xz:
32 git tag -v $(GIT_TAG) || true
33 if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \
34 git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(GIT_TAG) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \
35 fi
36 [ ! -e ../build-area ] && mkdir ../build-area || true
37 [ ! -e ../build-area/$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] && cp ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ../build-area
38
39 fetch-upstream-remote:
40 git remote add upstream $(UPSTREAM_GIT) || true
41 git remote set-url upstream $(UPSTREAM_GIT)
42 git fetch upstream