Files
KamadoPool-StartOS-0351/Makefile
T
satoshi 2812d6dac3 Make PLATFORMS overridable for single-arch test builds
Default still builds linux/arm64/v8+linux/amd64 for shipping,
but 'make PLATFORMS=linux/amd64' skips the arm64 leg on hosts
without qemu-user-static registered.
2026-04-14 10:03:33 +03:00

36 lines
950 B
Makefile

PKG_ID := $(shell yq -r .id manifest.yaml)
PKG_VERSION := $(shell yq -r .version manifest.yaml)
TS_FILES := $(shell find ./scripts -name \*.ts 2>/dev/null)
.DELETE_ON_ERROR:
all: verify
verify: $(PKG_ID).s9pk
start-sdk verify s9pk $(PKG_ID).s9pk
install: $(PKG_ID).s9pk
start-cli package install $(PKG_ID).s9pk
$(PKG_ID).s9pk: manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js image.tar
start-sdk pack
scripts/embassy.js: $(TS_FILES)
deno run --allow-read --allow-write --allow-env --allow-net scripts/bundle.ts
KAMADO_SRC ?= ../KamadoPool
PLATFORMS ?= linux/arm64/v8,linux/amd64
image.tar: Dockerfile docker_entrypoint.sh
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) \
--platform=$(PLATFORMS) \
--build-arg ARCH=$(shell uname -m) \
--build-context kamado=$(KAMADO_SRC) \
-o type=oci,dest=image.tar .
clean:
rm -f $(PKG_ID).s9pk image.tar scripts/embassy.js
.PHONY: all verify install clean