2023-12-12 17:45:39 +00:00
|
|
|
export PLATFORM := linux/amd64
|
2023-12-10 18:05:50 +00:00
|
|
|
export BUILDER := $(shell which docker)
|
2024-02-08 17:09:58 +00:00
|
|
|
export REGISTRY_LOCAL := stagex-local
|
|
|
|
export REGISTRY_REMOTE := stagex
|
2024-08-26 03:56:43 +00:00
|
|
|
export CHECK ?= 0
|
2024-01-30 00:23:48 +00:00
|
|
|
export NOCACHE ?= 0
|
2024-01-28 10:24:33 +00:00
|
|
|
export MIRRORS := \
|
2024-01-30 00:23:48 +00:00
|
|
|
git.distrust.co \
|
|
|
|
hub.docker.com
|
|
|
|
ifeq ($(NOCACHE), 1)
|
|
|
|
NOCACHE_FLAG=--no-cache
|
|
|
|
else
|
|
|
|
NOCACHE_FLAG=
|
|
|
|
endif
|
|
|
|
export NOCACHE_FLAG
|
2024-08-26 03:56:43 +00:00
|
|
|
ifeq ($(CHECK), 1)
|
|
|
|
CHECK_FLAG=--check
|
|
|
|
else
|
|
|
|
CHECK_FLAG=
|
|
|
|
endif
|
|
|
|
export CHECK_FLAG
|
|
|
|
|
2023-12-12 17:45:39 +00:00
|
|
|
clean_logs := $(shell rm *.log 2>&1 >/dev/null || :)
|
2024-02-13 04:51:59 +00:00
|
|
|
|
2023-12-12 17:45:39 +00:00
|
|
|
DEFAULT_GOAL := default
|
|
|
|
.PHONY: default
|
2024-02-13 17:27:10 +00:00
|
|
|
default: all
|
|
|
|
|
|
|
|
include src/macros.mk
|
|
|
|
include src/packages.mk
|
|
|
|
include src/groups.mk
|
2024-02-12 21:41:51 +00:00
|
|
|
|
|
|
|
.PHONY: all
|
2024-02-13 17:27:10 +00:00
|
|
|
all: \
|
|
|
|
compat \
|
|
|
|
$(shell find packages/* -type d -exec sh -c 'basename {} | tr "\n" " "' \; ) \
|
|
|
|
digests.txt
|
2023-12-15 20:32:54 +00:00
|
|
|
|
2024-08-26 03:56:43 +00:00
|
|
|
.PHONY: check
|
|
|
|
check:
|
|
|
|
$(MAKE) CHECK=1 all
|
|
|
|
|
2024-02-09 06:28:41 +00:00
|
|
|
.PHONY: compat
|
|
|
|
compat:
|
|
|
|
./src/compat.sh
|
|
|
|
|
2024-02-17 18:19:47 +00:00
|
|
|
.PHONY: preseed
|
|
|
|
preseed:
|
|
|
|
./src/preseed.sh
|
|
|
|
|
2024-04-01 04:13:39 +00:00
|
|
|
.PHONY: verify
|
|
|
|
verify:
|
|
|
|
./src/verify.sh
|
|
|
|
|
2024-02-09 06:28:41 +00:00
|
|
|
.PHONY: digests
|
|
|
|
digests:
|
2024-04-01 02:49:28 +00:00
|
|
|
./src/digests.sh
|
|
|
|
|
|
|
|
digests.txt: $(shell find out -iname index.json | tr "\n" " ")
|
|
|
|
./src/digests.sh > digests.txt
|
|
|
|
|
|
|
|
.PHONY: sign
|
|
|
|
sign:
|
|
|
|
./src/digests.sh | diff digests.txt /dev/stdin
|
2024-04-01 02:52:09 +00:00
|
|
|
cut -d' ' -f2 digests.txt | xargs -n1 ./src/sign.sh $(REGISTRY_REMOTE)
|
2024-02-12 21:51:02 +00:00
|
|
|
|
2023-12-18 04:05:16 +00:00
|
|
|
out/graph.svg: Makefile
|
2023-12-15 20:32:54 +00:00
|
|
|
$(MAKE) -Bnd | make2graph | dot -Tsvg -o graph.svg
|
2024-02-26 22:01:03 +00:00
|
|
|
|
2024-03-01 21:39:07 +00:00
|
|
|
.PHONY: gen-make
|
|
|
|
gen-make: out/sxctl/index.json $(shell find packages/*/Containerfile | tr '\n' ' ')
|
2024-02-26 22:01:03 +00:00
|
|
|
env -C out/sxctl tar -cf - . | docker load
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--volume .:/src \
|
|
|
|
--user $(shell id -u):$(shell id -g) \
|
|
|
|
stagex/sxctl -baseDir=/src gen make
|