-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
71 lines (63 loc) · 3.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
COMMIT = $(shell (cd "$(SRCDIR)" && git rev-parse HEAD))
# Ensure "install" isn't the default
.PHONY: all
all:
@echo "Usage: make install [DESTDIR=...]"
@exit 1
.PHONY: install
install:
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/coreos-enable-network.service
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/coreos-enable-network.sh
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/coreos-teardown-initramfs.service
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/coreos-teardown-initramfs.sh
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/ignition-setup-user.service
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/ignition-setup-user.sh
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/ignition-ostree-mount-var.service
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/ignition-ostree-mount-var.sh
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/module-setup.sh
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/35ignition-edge \
dracut/35ignition-edge/ignition-edge-generator
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/99emergency-shell-setup \
dracut/99emergency-shell-setup/*.service
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/99emergency-shell-setup \
dracut/99emergency-shell-setup/*.sh
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/10coreos-sysctl \
dracut/10coreos-sysctl/*.sh
install -D -m 0644 -t $(DESTDIR)/usr/lib/dracut/modules.d/99journal-conf \
dracut/99journal-conf/*.conf
install -D -m 0755 -t $(DESTDIR)/usr/lib/dracut/modules.d/99journal-conf \
dracut/99journal-conf/*.sh
install -D -m 0644 -t $(DESTDIR)/usr/lib/systemd/system systemd/ignition-firstboot-complete.service
install -D -m 0644 -t $(DESTDIR)/usr/lib/systemd/system systemd/coreos-ignition-write-issues.service
install -D -m 0755 -t $(DESTDIR)/usr/libexec \
scripts/coreos-ignition-write-issues
install -D -m 0644 -t $(DESTDIR)/usr/lib/systemd/system systemd/coreos-check-ssh-keys.service
install -D -m 0755 -t $(DESTDIR)/usr/libexec \
scripts/coreos-check-ssh-keys
RPM_SPECFILE=rpmbuild/SPECS/ignition-edge-$(COMMIT).spec
RPM_TARBALL=rpmbuild/SOURCES/ignition-edge-$(COMMIT).tar.gz
$(RPM_SPECFILE):
mkdir -p $(CURDIR)/rpmbuild/SPECS
(echo "%global commit $(COMMIT)"; git show HEAD:ignition-edge.spec) > $(RPM_SPECFILE)
$(RPM_TARBALL):
mkdir -p $(CURDIR)/rpmbuild/SOURCES
git archive --prefix=ignition-edge-$(COMMIT)/ --format=tar.gz HEAD > $(RPM_TARBALL)
.PHONY: srpm
srpm: $(RPM_SPECFILE) $(RPM_TARBALL)
rpmbuild -bs \
--define "_topdir $(CURDIR)/rpmbuild" \
$(RPM_SPECFILE)
.PHONY: rpm
rpm: $(RPM_SPECFILE) $(RPM_TARBALL)
rpmbuild -bb \
--define "_topdir $(CURDIR)/rpmbuild" \
$(RPM_SPECFILE)