1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/make -f
PYVERS := $(shell pyversions -r)
PY3VERS := $(shell py3versions -r)
DEB_VERSION := $(shell dpkg-parsechangelog --show-field=Version)
UPSTREAM_VERSION := $(shell x="$(DEB_VERSION)"; echo "$${x%-*}")
PKG_VERSION := $(shell x="$(DEB_VERSION)"; echo "$${x\#\#*-}")
%:
dh $@ --with=python2,python3
override_dh_auto_install:
dh_auto_install
set -ex; for python in $(PY3VERS) $(PYVERS); do \
$$python setup.py build --executable=/usr/bin/python && \
$$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
done
chmod 755 $(CURDIR)/debian/tmp/usr/lib/curtin/helpers/*
for f in $$(find $(CURDIR)/debian/tmp/usr/lib -type f -name version.py); do [ -f "$$f" ] || continue; sed -i 's,@@PACKAGED_VERSION@@,$(DEB_VERSION),' "$$f"; done
|