From 51f5b88062aa59dec32efab6619de4ea739ccad8 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 25 Apr 2012 14:18:23 +0300 Subject: [PATCH] initial branding feature As duly noted by glebfm@, branding issues need more attention by now since only stage1/install2 got some of it so far in this regard. Hence the dedicated feature comes to the rescue (well no, it doesn't actually mess with rescue!). --- features.in/branding/README | 3 +++ features.in/branding/config.mk | 13 +++++++++++++ features.in/branding/live/lib/50branding.mk | 1 + features.in/branding/main/lib/50branding.mk | 1 + features.in/branding/stage1/lib/50branding.mk | 1 + features.in/syslinux/config.mk | 2 +- image.in/functions.mk | 4 ++++ 7 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 features.in/branding/README create mode 100644 features.in/branding/config.mk create mode 100644 features.in/branding/live/lib/50branding.mk create mode 100644 features.in/branding/main/lib/50branding.mk create mode 100644 features.in/branding/stage1/lib/50branding.mk diff --git a/features.in/branding/README b/features.in/branding/README new file mode 100644 index 00000000..c961d9bc --- /dev/null +++ b/features.in/branding/README @@ -0,0 +1,3 @@ +Эта фича врезается в makefile субпрофилей и обеспечивает +добавление задающих внешний вид и сообщения дистрибутива +пакетов; см. тж. http://www.altlinux.org/Branding diff --git a/features.in/branding/config.mk b/features.in/branding/config.mk new file mode 100644 index 00000000..7c61feb2 --- /dev/null +++ b/features.in/branding/config.mk @@ -0,0 +1,13 @@ +use/branding: + @$(call add_feature) + @### see install2 + @#$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release) + +# NB: not every distro might have all the branding of its own +use/branding/full: use/branding use/syslinux/ui/gfxboot + @$(call add,THE_BRANDING,alterator bootsplash graphics) + @$(call add,THE_BRANDING,indexhtml notes slideshow) + +use/branding/complete: use/branding/full + @$(call add,INSTALL2_BRANDING,notes slideshow) + @$(call add,THE_BRANDING,menu) ### not sure if it's generic enough diff --git a/features.in/branding/live/lib/50branding.mk b/features.in/branding/live/lib/50branding.mk new file mode 100644 index 00000000..7767b6fd --- /dev/null +++ b/features.in/branding/live/lib/50branding.mk @@ -0,0 +1 @@ +IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING)) diff --git a/features.in/branding/main/lib/50branding.mk b/features.in/branding/main/lib/50branding.mk new file mode 100644 index 00000000..7767b6fd --- /dev/null +++ b/features.in/branding/main/lib/50branding.mk @@ -0,0 +1 @@ +IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING)) diff --git a/features.in/branding/stage1/lib/50branding.mk b/features.in/branding/stage1/lib/50branding.mk new file mode 100644 index 00000000..dd4cb59a --- /dev/null +++ b/features.in/branding/stage1/lib/50branding.mk @@ -0,0 +1 @@ +CHROOT_PACKAGES_REGEXP += $(call branding,$(STAGE1_BRANDING)) diff --git a/features.in/syslinux/config.mk b/features.in/syslinux/config.mk index f7a5cb65..75c7fdb1 100644 --- a/features.in/syslinux/config.mk +++ b/features.in/syslinux/config.mk @@ -9,7 +9,7 @@ use/syslinux/ui/%: use/syslinux @$(call set,SYSLINUX_UI,$*) @if [ "$*" == gfxboot ]; then \ $(call add,STAGE1_PACKAGES,gfxboot); \ - $(call add,STAGE1_PACKAGES,branding-$$(BRANDING)-bootloader); \ + $(call add,STAGE1_BRANDING,bootloader); \ fi # modules and config snippets just add up diff --git a/image.in/functions.mk b/image.in/functions.mk index 85d4a832..765c9b54 100644 --- a/image.in/functions.mk +++ b/image.in/functions.mk @@ -19,5 +19,9 @@ NULL := SPACE := $(NULL) # the officially documented way of getting a space list2re = $(subst $(SPACE),|,$(strip $(1))) + # args: KMODULES, KFLAVOURS kpackages = ^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$ + +# arg: branding subpackages +branding = ^branding-$(BRANDING)-($(call list2re,$(1)))$$