2019-03-01 10:56:36 -06:00
|
|
|
export GO111MODULE=on
|
|
|
|
|
|
2019-09-23 21:04:41 +00:00
|
|
|
# Canonical version of this in https://github.com/coreos/coreos-assembler/blob/6eb97016f4dab7d13aa00ae10846f26c1cd1cb02/Makefile#L19
|
|
|
|
|
GOARCH:=$(shell uname -m)
|
|
|
|
|
ifeq ($(GOARCH),x86_64)
|
|
|
|
|
GOARCH=amd64
|
|
|
|
|
else ifeq ($(GOARCH),aarch64)
|
|
|
|
|
GOARCH=arm64
|
2024-09-13 14:36:47 +03:00
|
|
|
else ifeq ($(GOARCH),loongarch64)
|
|
|
|
|
GOARCH=loong64
|
2020-08-19 09:30:07 +02:00
|
|
|
else ifeq ($(patsubst armv%,arm,$(GOARCH)),arm)
|
|
|
|
|
GOARCH=arm
|
2020-08-10 15:33:18 +02:00
|
|
|
else ifeq ($(patsubst i%86,386,$(GOARCH)),386)
|
|
|
|
|
GOARCH=386
|
2019-09-23 21:04:41 +00:00
|
|
|
endif
|
|
|
|
|
|
2018-03-14 17:28:45 -07:00
|
|
|
.PHONY: all
|
|
|
|
|
all:
|
|
|
|
|
./build
|
2017-06-08 12:10:15 -07:00
|
|
|
|
2019-09-23 21:04:41 +00:00
|
|
|
.PHONY: install
|
|
|
|
|
install: all
|
2020-07-23 16:46:54 -06:00
|
|
|
for x in dracut/*; do \
|
|
|
|
|
bn=$$(basename $$x); \
|
2020-08-10 23:47:43 +02:00
|
|
|
install -m 0644 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \
|
2020-07-23 16:46:54 -06:00
|
|
|
done
|
2020-08-10 23:47:43 +02:00
|
|
|
chmod a+x $(DESTDIR)/usr/lib/dracut/modules.d/*/*.sh $(DESTDIR)/usr/lib/dracut/modules.d/*/*-generator
|
2022-04-20 15:20:25 -04:00
|
|
|
install -m 0644 -D -t $(DESTDIR)/usr/lib/systemd/system systemd/ignition-delete-config.service
|
2019-09-23 21:04:41 +00:00
|
|
|
install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/30ignition bin/$(GOARCH)/ignition
|
|
|
|
|
install -m 0755 -D -t $(DESTDIR)/usr/bin bin/$(GOARCH)/ignition-validate
|
2022-04-20 15:20:25 -04:00
|
|
|
install -m 0755 -d $(DESTDIR)/usr/libexec
|
2022-05-14 01:21:55 -04:00
|
|
|
ln -sf ../lib/dracut/modules.d/30ignition/ignition $(DESTDIR)/usr/libexec/ignition-apply
|
2022-04-20 15:20:25 -04:00
|
|
|
ln -sf ../lib/dracut/modules.d/30ignition/ignition $(DESTDIR)/usr/libexec/ignition-rmcfg
|
2019-09-23 21:04:41 +00:00
|
|
|
|
2023-10-11 20:28:10 -04:00
|
|
|
install-grub-for-bootupd:
|
2025-03-17 14:52:48 -04:00
|
|
|
install -m 0644 -D -t $(DESTDIR)/usr/lib/bootupd/grub2-static/configs.d grub2/05_ignition.cfg
|
2023-10-11 20:28:10 -04:00
|
|
|
|
2017-06-08 12:10:15 -07:00
|
|
|
.PHONY: vendor
|
|
|
|
|
vendor:
|
2019-03-01 10:56:36 -06:00
|
|
|
@go mod vendor
|
|
|
|
|
@go mod tidy
|