summaryrefslogtreecommitdiff
path: root/data/Makefile.am
blob: e91361a71b5e2fe813e354ebd2bf16012029fdbd (plain)
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

if HAVE_SYSTEMD
systemdsystemunit_DATA = \
	NetworkManager.service \
	NetworkManager-wait-online.service \
	NetworkManager-dispatcher.service

NetworkManager.service: NetworkManager.service.in
	$(edit) $< >$@

if HAVE_SYSTEMD_200
NetworkManager-wait-online.service: NetworkManager-wait-online.service.in
	$(edit) $< >$@
else
NetworkManager-wait-online.service: NetworkManager-wait-online-systemd-pre200.service.in
	$(edit) $< >$@
endif

NetworkManager-dispatcher.service: NetworkManager-dispatcher.service.in
	$(edit) $< >$@

servicedir = $(datadir)/dbus-1/system-services
service_in_files = org.freedesktop.NetworkManager.service.in
service_DATA = $(service_in_files:.service.in=.service)

$(service_DATA): $(service_in_files) Makefile
	$(edit) $< >$@

install-exec-local:
	install -d $(DESTDIR)$(systemdsystemunitdir)/network-online.target.wants
	ln -sf $(systemdsystemunitdir)/NetworkManager-wait-online.service $(DESTDIR)$(systemdsystemunitdir)/network-online.target.wants
endif

examplesdir = $(docdir)/examples
examples_DATA = server.conf

server.conf: server.conf.in
	$(edit) $< >$@

edit = sed \
	-e 's|@bindir[@]|$(bindir)|g' \
	-e 's|@sbindir[@]|$(sbindir)|g' \
	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
	-e 's|@localstatedir[@]|$(localstatedir)|g' \
	-e 's|@libexecdir[@]|$(libexecdir)|g' \
	-e 's|@DISTRO_NETWORK_SERVICE[@]|$(DISTRO_NETWORK_SERVICE)|g'

EXTRA_DIST = \
	NetworkManager.service.in \
	NetworkManager-wait-online.service.in \
	NetworkManager-wait-online-systemd-pre200.service.in \
	NetworkManager-dispatcher.service.in \
	org.freedesktop.NetworkManager.service.in \
	server.conf.in

CLEANFILES = \
	NetworkManager.service \
	NetworkManager-wait-online.service \
	NetworkManager-dispatcher.service \
	org.freedesktop.NetworkManager.service \
	server.conf