mkimage-profiles/features.in/build-distro/lib/build-distro.mk
Michael Shigorin d6972a39bf introduced THE_{KMODULES,PACKAGES,LISTS,GROUPS}
As too many things started duplicating between distros proper
and (e.g. corresponding) LiveCDs, it became apparent that a class
of entities which end up working for THE_USER (not a sysadmin,
and not a developer, just a Linux user) is in need.

So THE_KMODULES will power installed basesystem and live image,
while THE_PACKAGES, THE_LISTS and THE_GROUPS will participate
in building those.
2011-12-19 22:32:59 +02:00

44 lines
1.3 KiB
Makefile

# step 4: build the distribution image
# for complex-specified subprofiles like stage2/live,
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
BOOT_TYPE = isolinux
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
# FIXME: installable live needs it too, don't move to install2 feature
### see also .../pkg.in/lists/Makefile
ifneq (,$(findstring install2,$(FEATURES)))
METADATA = metadata
endif
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) imagedir
metadata: dot-base
@mkdir -p files/Metadata
@rm -f files/Metadata/pkg-groups.tar
# see also alterator-pkg (backend3/pkg-install); we only tar up what's up to it
@tar -cvf files/Metadata/pkg-groups.tar -C $(PKGDIR) \
$$(echo $(call list,$(MAIN_GROUPS) .base) \
$(call group,$(MAIN_GROUPS)) \
| sed 's,$(PKGDIR)/*,,g')
dot-base:
@p="$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))"; \
echo -e "\n## added by build-distro.mk\n$$p" >> $(call list,.base)
dot-disk:
@mkdir -p files/.disk
@echo "ALT Linux based" >files/.disk/info
@echo "$(ARCH)" >files/.disk/arch
@echo "$(DATE)" >files/.disk/date
@if type -t git >&/dev/null; then \
( cd $(TOPDIR) && test -d .git && \
git show-ref --head -ds -- HEAD ||:) \
>files/.disk/commit 2>/dev/null; \
fi