~smoser/curtin/yakkety.lp1666986

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Scott Moser
  • Date: 2017-02-22 16:29:33 UTC
  • Revision ID: smoser@ubuntu.com-20170222162933-78jrk6ujhm9ark1s
debian/rules: record debian package version in installed package.
(LP: #1666986)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
PYVERS := $(shell pyversions -r)
4
4
PY3VERS := $(shell py3versions -r)
5
5
 
 
6
DEB_VERSION := $(shell dpkg-parsechangelog --show-field=Version)
 
7
UPSTREAM_VERSION := $(shell x="$(DEB_VERSION)"; echo "$${x%-*}")
 
8
PKG_VERSION := $(shell x="$(DEB_VERSION)"; echo "$${x\#\#*-}")
 
9
 
6
10
%:
7
11
        dh $@ --with=python2,python3
8
12
 
13
17
                $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
14
18
        done
15
19
        chmod 755 $(CURDIR)/debian/tmp/usr/lib/curtin/helpers/*
 
20
        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