90-build-distro.mk 1.61 KB
Newer Older
1 2
# step 4: build the distribution image

3 4 5 6 7
# proxy over the ISO metadata collected; see also genisoimagerc(5)
BOOT_SYSI := $(META_SYSTEM_ID)
BOOT_PUBL := $(META_PUBLISHER)
BOOT_PREP := $(META_PREPARER)
BOOT_APPI := $(META_APP_ID)
8
BOOT_VOLI := $(shell echo $(META_VOL_ID) | cut -c1-32)
9 10 11
BOOT_VOLS := $(META_VOL_SET)
BOOT_BIBL := $(META_BIBLIO)
BOOT_ABST := $(META_ABSTRACT)
12
BOOT_COPY := $(META_LICENSE_FILE)
13 14 15 16 17 18 19 20 21

ISODATA_SYSI = $(BOOT_SYSI)
ISODATA_PUBL = $(BOOT_PUBL)
ISODATA_PREP = $(BOOT_PREP)
ISODATA_APPI = $(BOOT_APPI)
ISODATA_VOLI = $(BOOT_VOLI)
ISODATA_VOLS = $(BOOT_VOLS)
ISODATA_BIBL = $(BOOT_BIBL)
ISODATA_ABST = $(BOOT_ABST)
22
ISODATA_COPY = $(BOOT_COPY)
23

24
DATE_F    := $(shell date +%F)
25

26 27 28
ifeq (isodata,$(IMAGE_PACKTYPE))
BOOT_TYPE :=
else
29 30
ifeq (,$(filter-out e2k%,$(ARCH)))
BOOT_TYPE := e2kboot
31 32
endif
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
33
BOOT_TYPE := isolinux
34
endif
35
ifeq (,$(filter-out aarch64,$(ARCH)))
36
BOOT_TYPE := efiboot
37
endif
38 39 40
ifeq (,$(filter-out ppc64le,$(ARCH)))
BOOT_TYPE := ieee1275boot
endif
41
endif
42

43
all: | $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
44 45
	postprocess $(GLOBAL_CLEAN_WORKDIR)

46
prep: | $(GLOBAL_DEBUG) dot-disk $(WHATEVER)
47

Michael Shigorin's avatar
Michael Shigorin committed
48
# can't use mp-showref which belongs to the metaprofile
49 50
dot-disk:
	@mkdir -p files/.disk
51 52 53 54 55
	@if [ -n "$(META_DISK_INFO)" ]; then \
		echo "$(META_DISK_INFO)" >files/.disk/info; \
	else \
		echo "$(META_VOL_ID) build $(DATE_F)" >files/.disk/info; \
	fi
56 57 58
	@echo "$(ARCH)" >files/.disk/arch
	@echo "$(DATE)" >files/.disk/date
	@if type -t git >&/dev/null; then \
59 60
		( cd $(TOPDIR) && test -d .git && \
		git show-ref --head -ds -- HEAD ||:) \
61 62
		>files/.disk/commit 2>/dev/null; \
	fi