mkimage-profiles/image.in/Makefile
Michael Shigorin 720a579690 wash, rinse, repeat
install2 cleanups:

- functionally indifferent ones: particularly, install2/*/98system's
  "mkdir -p /image" was superfluous as it was done by that time already
  by sub.in/stage2/image-scripts.d/00stage1

- taken apart, prepared for tags: so far it's a mostly moot change
  since the installer cleanup scripts themselves are mostly the same as
  preceding 90cleanup was (with some additions corresponding to recent
  kernel development); it's still unclear what the mechanism for
  configuring the cleanups in effect will be, either directory/package
  regex lists or tagged scripts excluded from execution by yet another tag

fixes:

- image.in/Makefile: fix metadata related test; the actual test was
  assuming that stage1 kernel means installer, which is not the case
  since generic stage2 introduction; oh well

- 85cleanup-lowmem: a "_" too much was the culprit in destroying the
  needed translations along with those deemed superfluous; thanks go to
  Oleg Ivanov and Lenar Shakirov for finding the bug and proposing the
  fix altogether

additions:

- features.in/Makefile: reworked help target; it was rather inaccessible
  due to BUILDDIR normally undefined at the time of direct make
  invocation, and BUILDDIR is normally defined during normal builds
  anyways so let's try it this way.

- README++

daydreams:

- 01-genbasedir: we should drop bzip2 compressed pkglists some day
  but see genbasedir and apt-cdrom first, 90-pkg.sh (alterator-pkg)
  will fail miserably otherwise
2011-11-04 16:15:31 +02:00

83 lines
2.1 KiB
Makefile

# step 4: build image (final stage)
#
# NB: this directory forms the initial BUILDDIR/
ifndef GLOBAL_BUILDDIR
$(error GLOBAL_BUILDDIR not defined)
endif
include functions.mk
include $(GLOBAL_BUILDDIR)/functions.mk
include $(GLOBAL_BUILDDIR)/distcfg.mk
include $(MKIMAGE_PREFIX)/config.mk
# for complex-specified subprofiles like stage2/live,
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
# "main" subprofile needs genbasedir
CHROOT_PACKAGES = apt-utils
MKI_PACK_RESULTS = isoboot:$(IMAGENAME)
COPY_TREE = ./files
BOOT_TYPE = isolinux
# outdir shouldn't be wiped clean before use
CLEANUP_OUTDIR ?=
APTCONF := $(wildcard $(APTCONF))
ifeq "$(APTCONF)" ""
GLOBAL_HSH_APT_CONFIG = /etc/apt/apt.conf
else
GLOBAL_HSH_APT_CONFIG = $(APTCONF)
endif
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
### what about installable live?
ifneq (,$(findstring install2,$(FEATURES)))
METADATA = metadata
endif
include $(MKIMAGE_PREFIX)/targets.mk
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
$(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:
@{ \
echo -e "\n## added by image.in/Makefile"; \
echo "$(call kpackages,$(KMODULES),$(KFLAVOURS))"; \
} >> $(call list,.base)
$(IMAGEDIR):
@mkdir -p "$(IMAGEDIR)"
# specified only for the final image, not for the subparts
pack-image: OUTDIR = $(IMAGEDIR)
debug:
@echo "TOPDIR=$(TOPDIR)"
@echo "ARCH=$(ARCH)"
@echo "GLOBAL_HSH_APT_CONFIG=$(GLOBAL_HSH_APT_CONFIG)"
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) && \
git show-ref --head -ds -- HEAD ) \
>files/.disk/commit 2>/dev/null; \
fi