-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
41 lines (31 loc) · 1.15 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
PREFIX = /usr/local
SBIN = $(PREFIX)/sbin
SYSTEM = $(PREFIX)/lib/systemd/system
MAN = $(PREFIX)/share/man
UNITS = systemd/corridor-data.service \
systemd/corridor-init-forwarding.service \
systemd/corridor-init-logged.service \
systemd/corridor-init-snat.service \
systemd/corridor.target
default: man/corridor.8
all: man/corridor.8 systemd-units
systemd-units: $(UNITS)
%.service: %.service.in
sed 's:@SBIN@:$(SBIN):' $< >$@
%.8: %.8.ronn
ronn -r $<
install: man/corridor.8
install -d $(DESTDIR)$(SBIN) $(DESTDIR)$(MAN)/man8 $(DESTDIR)/etc/corridor.d $(DESTDIR)/var/lib/corridor
install sbin/* $(DESTDIR)$(SBIN)
install -m 644 man/corridor.8 $(DESTDIR)$(MAN)/man8
for f in sbin/*; do ln -sf corridor.8 $(DESTDIR)$(MAN)/man8/$${f##*/}.8; done
install -m 644 corridor.d/* $(DESTDIR)/etc/corridor.d
install-systemd: systemd-units
install -d $(DESTDIR)$(SYSTEM)
install -m 644 $(UNITS) $(DESTDIR)$(SYSTEM)
install-qubes:
install -d $(DESTDIR)/etc/corridor.d $(DESTDIR)$(SYSTEM)
install -m 644 qubes/corridor.d/* $(DESTDIR)/etc/corridor.d
umask 022 && cp -RP qubes/systemd/* $(DESTDIR)$(SYSTEM)
clean:
rm -f systemd/*.service