From 1f13b3a0395be23551cb2541c8d946064b0d70f2 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Fri, 25 Mar 2016 13:41:41 +0300 Subject: [PATCH] pkg.in: initial profiles/ This is to support Centaurus-like images featuring more than a single installation profile (e.g., "workstation/server/minimal"). Quite a few more modifications are needed to do it right though as m-p has fallen prey to exactly the "single root composition" assumption with its current THE_* variables semantics and processing. --- pkg.in/Makefile | 2 +- pkg.in/profiles/Makefile | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 pkg.in/profiles/Makefile diff --git a/pkg.in/Makefile b/pkg.in/Makefile index c4d25f3f..f307689f 100644 --- a/pkg.in/Makefile +++ b/pkg.in/Makefile @@ -7,6 +7,6 @@ endif # sequential execution, no reason to haste all: - @for dir in lists groups; do \ + @for dir in lists groups profiles; do \ $(MAKE) -C $$dir; \ done diff --git a/pkg.in/profiles/Makefile b/pkg.in/profiles/Makefile new file mode 100644 index 00000000..be21a0c7 --- /dev/null +++ b/pkg.in/profiles/Makefile @@ -0,0 +1,21 @@ +# step 3: copy package profiles referenced in distro configuration +# (and only those!) over to $(BUILDDIR) + +ifndef BUILDDIR +$(error BUILDDIR not defined) +endif + +include $(BUILDDIR)/distcfg.mk +SUFFIX := pkg/profiles +TARGET := $(BUILDDIR)/$(SUFFIX) + +all: $(GLOBAL_DEBUG) + @if [ -n "$(PKG_PROFILES)" ]; then \ + mkdir -p $(TARGET) && \ + cp -at $(TARGET) -- \ + $(addsuffix .directory,$(PKG_PROFILES)); \ + mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"; \ + fi + +debug: + @echo "** PKG_PROFILES: $(PKG_PROFILES)"