From 89165e9d889f3dc0a0a40290fad21b6ffbaa3782 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Wed, 1 Jul 2026 17:29:16 +0100 Subject: pulls vars out to container.mk --- container.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'container.mk') diff --git a/container.mk b/container.mk index 3b1e5ae..101e4e4 100644 --- a/container.mk +++ b/container.mk @@ -1,7 +1,16 @@ +CPU_ARCH := $(if $(shell which arch 2>/dev/null),\ + $(shell arch),\ + $(shell lscpu | grep ^Architecture: | sed "s/^Architecture:[[:space:]]*\([[:alnum:][:punct:]]\+\).*/\1/")) +IMAGE_PREFIX := $(if $(filter armv7%,$(CPU_ARCH)),armv7/) +REGISTRY_DOMAIN := git.joeac.net +REGISTRY_USER := joeac + +container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_PREFIX)joeac.net-$(module) + define build_module_rule = .PHONY: build_$(module) build_$(module): make_$(module) $(module).Dockerfile - podman-compose build $(module) + IMAGE_PREFIX="$(IMAGE_PREFIX)" podman-compose build $(module) endef define push_module_rule = -- cgit v1.2.3