@@ -18,6 +18,12 @@ prev_revision := $(word $(words $(prev_revisions)),$(prev_revisions))
prev_fullver ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 | sed -ne 's/^Version: *//p')
+# Get variants. Assume primary if debian/variants is not present.
+variants = --
+ifneq (,$(wildcard $(DEBIAN)/variants))
+ variants := $(shell cat $(DEBIAN)/variants)
+endif
+
# Get upstream version info
upstream_version := $(shell sed -n 's/^VERSION = \(.*\)$$/\1/p' Makefile)
upstream_patchlevel := $(shell sed -n 's/^PATCHLEVEL = \(.*\)$$/\1/p' Makefile)
@@ -62,6 +62,7 @@ printenv:
@echo "abinum = $(abinum)"
@echo "upstream_tag = $(upstream_tag)"
@echo "gitver = $(gitver)"
+ @echo "variants = $(variants)"
@echo "flavours = $(flavours)"
@echo "skipabi = $(skipabi)"
@echo "skipmodule = $(skipmodule)"
Read the contents of $DEBIAN/variants into a variable, for use in later patches. For backwards compatability, assume the primary variant "--" if the variants file is not present. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> --- debian/rules.d/0-common-vars.mk | 6 ++++++ debian/rules.d/1-maintainer.mk | 1 + 2 files changed, 7 insertions(+)