]> git.ipfire.org Git - thirdparty/strongswan.git/blame - conf/Makefile.am
updown: Use process abstraction to invoke updown script
[thirdparty/strongswan.git] / conf / Makefile.am
CommitLineData
1b98f858
TB
1# make this relative to the location of strongswan.conf
2strongswanconfdir = `dirname $(strongswan_conf)`
3strongswanddir = $(strongswanconfdir)/strongswan.d
4charonconfdir = $(strongswanddir)/charon
7f535b39
TB
5# copy these files also to /usr/share
6templatesdir = $(pkgdatadir)/templates/config
7optionstemplatedir = $(templatesdir)/strongswan.d
8pluginstemplatedir = $(templatesdir)/plugins
c75acc4c 9
1b98f858 10options = \
4d066ef7 11 options/aikgen.opt \
5ac75787 12 options/attest.opt \
da8b16a1 13 options/charon.opt \
4576f7f9 14 options/charon-logging.opt \
e2d9f27c 15 options/charon-systemd.opt \
bf3f4bf7 16 options/imcv.opt \
ff94fe15
TB
17 options/manager.opt \
18 options/medsrv.opt \
bf3f4bf7 19 options/pacman.opt \
3986c1e3 20 options/pki.opt \
ff94fe15 21 options/pool.opt \
3986c1e3 22 options/scepclient.opt \
ff94fe15 23 options/starter.opt \
38f27e17 24 options/swanctl.opt \
3986c1e3 25 options/tnc.opt
1b98f858
TB
26
27plugins = \
828815b0
TB
28 plugins/android_log.opt \
29 plugins/attr.opt \
30 plugins/attr-sql.opt \
31 plugins/certexpire.opt \
32 plugins/coupling.opt \
33 plugins/dhcp.opt \
34 plugins/dnscert.opt \
35 plugins/duplicheck.opt \
36 plugins/eap-aka.opt \
37 plugins/eap-aka-3ggp2.opt \
38 plugins/eap-dynamic.opt \
39 plugins/eap-gtc.opt \
40 plugins/eap-peap.opt \
41 plugins/eap-radius.opt \
42 plugins/eap-sim.opt \
43 plugins/eap-simaka-sql.opt \
44 plugins/eap-tls.opt \
45 plugins/eap-tnc.opt \
46 plugins/eap-ttls.opt \
47 plugins/error-notify.opt \
48 plugins/gcrypt.opt \
49 plugins/ha.opt \
5ac75787 50 plugins/imc-attestation.opt \
bf3f4bf7
TB
51 plugins/imc-os.opt \
52 plugins/imc-scanner.opt \
5ac75787 53 plugins/imc-swid.opt \
bf3f4bf7 54 plugins/imc-test.opt \
5ac75787 55 plugins/imv-attestation.opt \
bf3f4bf7
TB
56 plugins/imv-os.opt \
57 plugins/imv-scanner.opt \
bfd8f8c5 58 plugins/imv-swid.opt \
bf3f4bf7 59 plugins/imv-test.opt \
828815b0
TB
60 plugins/ipseckey.opt \
61 plugins/led.opt \
828815b0
TB
62 plugins/kernel-libipsec.opt \
63 plugins/kernel-netlink.opt \
64 plugins/kernel-pfroute.opt \
65 plugins/load-tester.opt \
66 plugins/lookip.opt \
67 plugins/ntru.opt \
68 plugins/openssl.opt \
69 plugins/pkcs11.opt \
70 plugins/radattr.opt \
71 plugins/random.opt \
72 plugins/resolve.opt \
73 plugins/socket-default.opt \
74 plugins/sql.opt \
75 plugins/stroke.opt \
76 plugins/systime-fix.opt \
77 plugins/tnc-ifmap.opt \
4576f7f9
TB
78 plugins/tnc-imc.opt \
79 plugins/tnc-imv.opt \
828815b0 80 plugins/tnc-pdp.opt \
4576f7f9
TB
81 plugins/tnccs-11.opt \
82 plugins/tnccs-20.opt \
828815b0
TB
83 plugins/unbound.opt \
84 plugins/updown.opt \
7dbf9e15 85 plugins/vici.opt \
828815b0
TB
86 plugins/whitelist.opt \
87 plugins/xauth-eap.opt \
88 plugins/xauth-pam.opt
1b98f858
TB
89
90alloptions = $(options) $(plugins)
91
92confsnippets = $(alloptions:opt=conf)
93
94# we only install snippets for enabled plugins
95plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
96plugins_install_src = $(charon_plugins:%=plugins/%.conf)
7573a7ed
TB
97# only install snippets for enabled components
98# has to be defined via autoconf as we can't do it with automake conditionals
99options_install_src = $(strongswan_options:%=options/%.conf)
6a2de77f 100
7f535b39
TB
101templates_DATA = strongswan.conf
102optionstemplate_DATA = $(options_install_src)
103pluginstemplate_DATA = $(plugins_install_src)
91cc523c
TB
104man_MANS = \
105 strongswan.conf.5
1b98f858 106
7f62b7d0 107BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
1b98f858 108EXTRA_DIST = format-options.py strongswan.conf default.opt \
7f62b7d0 109 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
1b98f858 110
91cc523c
TB
111CLEANFILES=$(man_MANS)
112
1b98f858
TB
113.opt.conf:
114 $(AM_V_GEN) \
115 case "$<" in \
116 *plugins/*) \
117 sed \
118 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
119 $(srcdir)/default.opt | cat - $< | \
120 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
121 ;; \
122 *) \
123 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
124 ;; \
125 esac
126
127# we need another implicit rule to generate files from the generic template only
128# if the rules above did not catch it. this requires an intermediate step that
129# generates a copy of the generic config template.
130$(plugins_install_tmp):
d56a23c5
TB
131 @mkdir -p $(builddir)/plugins
132 @cp $(srcdir)/default.conf $(builddir)/$@
1b98f858
TB
133
134.tmp.conf:
135 $(AM_V_GEN) \
136 sed \
137 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
d56a23c5 138 $(builddir)/$< > $(builddir)/$@
1b98f858 139
7f62b7d0
TB
140strongswan.conf.5.main: $(alloptions)
141 $(AM_V_GEN) \
bd1c9f1e 142 cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@
7f62b7d0 143
bd1c9f1e 144strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
c4bb26b8 145 $(AM_V_GEN) \
bd1c9f1e 146 cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@
c4bb26b8 147
d56a23c5
TB
148clean-local:
149 rm -f plugins/*.conf plugins/*.tmp
150
1b98f858
TB
151maintainer-clean-local:
152 cd $(srcdir) && \
153 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
154
6a2de77f 155install-data-local: $(plugins_install_src)
0efea2fd
SL
156 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" || true
157 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" || true
158 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" || true
efce4559 159 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
6a2de77f
TB
160 for f in $(options_install_src); do \
161 name=`basename $$f`; \
5645ad29 162 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \
6a2de77f
TB
163 done
164 for f in $(plugins_install_src); do \
165 name=`basename $$f`; \
d56a23c5 166 if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
5645ad29 167 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \
6a2de77f 168 done