2022-08-02 11:13:43 -04:00
|
|
|
CONTAINER_RUNTIME ?= docker
|
|
|
|
IMAGENAME ?= localhost/coreos-assembler
|
|
|
|
IMAGETAG ?= latest
|
|
|
|
UPSTREAM ?= https://github.com/coreos/coreos-assembler
|
2022-08-18 09:43:52 -04:00
|
|
|
COMMIT ?= 2dd33ddc36e6b9e1cc01ee0740f29020d203ceb2
|
2022-08-02 11:13:43 -04:00
|
|
|
SRC_PATH = $(CURDIR)
|
|
|
|
BASE_PATH ?= $(SRC_PATH)
|
2022-08-03 02:29:13 -04:00
|
|
|
BUILDDIR ?= $(BASE_PATH)/build
|
|
|
|
CLONEDIR ?= $(BUILDDIR)/coreos-assembler
|
2022-08-02 11:13:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all clone patch containerimage clean
|
|
|
|
|
|
|
|
all: clone patch containerimage
|
|
|
|
|
|
|
|
clone:
|
|
|
|
@mkdir -p $(BUILDDIR)
|
|
|
|
git clone $(UPSTREAM) $(CLONEDIR)
|
|
|
|
cd $(CLONEDIR) && git checkout $(COMMIT)
|
|
|
|
|
|
|
|
patch:
|
2022-08-18 09:43:52 -04:00
|
|
|
cd $(CLONEDIR) && patch --verbose -p1 < $(BASE_PATH)/verity.patch
|
2022-08-02 11:13:43 -04:00
|
|
|
|
|
|
|
containerimage:
|
|
|
|
cd $(CLONEDIR) && $(CONTAINER_RUNTIME) build -t $(IMAGENAME):$(IMAGETAG) -f Dockerfile .
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILDDIR)
|