]> git.ipfire.org Git - thirdparty/strongswan.git/blame - conf/Makefile.am
charon-nm: Correctly set remote auth class for PSK authentication
[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 \
97c74b56 15 options/charon-nm.opt \
e2d9f27c 16 options/charon-systemd.opt \
bf3f4bf7 17 options/imcv.opt \
79b5a33c 18 options/imv_policy_manager.opt \
ff94fe15
TB
19 options/manager.opt \
20 options/medsrv.opt \
3986c1e3 21 options/pki.opt \
ff94fe15 22 options/pool.opt \
3986c1e3 23 options/scepclient.opt \
ff94fe15 24 options/starter.opt \
38f27e17 25 options/swanctl.opt \
032a5767 26 options/tnc.opt \
8aad7ffb 27 options/sec-updater.opt \
032a5767 28 options/sw-collector.opt
1b98f858
TB
29
30plugins = \
d1317adb 31 plugins/addrblock.opt \
828815b0
TB
32 plugins/android_log.opt \
33 plugins/attr.opt \
34 plugins/attr-sql.opt \
c2aca9ee 35 plugins/bliss.opt \
0aabfe07 36 plugins/bypass-lan.opt \
828815b0
TB
37 plugins/certexpire.opt \
38 plugins/coupling.opt \
67402ec7 39 plugins/curl.opt \
828815b0
TB
40 plugins/dhcp.opt \
41 plugins/dnscert.opt \
737375a2 42 plugins/drbg.opt \
828815b0
TB
43 plugins/duplicheck.opt \
44 plugins/eap-aka.opt \
1aba82bf
TB
45 plugins/eap-aka-3gpp.opt \
46 plugins/eap-aka-3gpp2.opt \
828815b0
TB
47 plugins/eap-dynamic.opt \
48 plugins/eap-gtc.opt \
49 plugins/eap-peap.opt \
50 plugins/eap-radius.opt \
51 plugins/eap-sim.opt \
52 plugins/eap-simaka-sql.opt \
53 plugins/eap-tls.opt \
54 plugins/eap-tnc.opt \
55 plugins/eap-ttls.opt \
56 plugins/error-notify.opt \
b2c1973f 57 plugins/ext-auth.opt \
ed14d3eb 58 plugins/forecast.opt \
828815b0
TB
59 plugins/gcrypt.opt \
60 plugins/ha.opt \
5ac75787 61 plugins/imc-attestation.opt \
6a3d0355 62 plugins/imc-hcd.opt \
bf3f4bf7
TB
63 plugins/imc-os.opt \
64 plugins/imc-scanner.opt \
2821c0f7 65 plugins/imc-swima.opt \
bf3f4bf7 66 plugins/imc-test.opt \
5ac75787 67 plugins/imv-attestation.opt \
bf3f4bf7
TB
68 plugins/imv-os.opt \
69 plugins/imv-scanner.opt \
3a7c594c 70 plugins/imv-swima.opt \
bf3f4bf7 71 plugins/imv-test.opt \
828815b0
TB
72 plugins/ipseckey.opt \
73 plugins/led.opt \
828815b0
TB
74 plugins/kernel-libipsec.opt \
75 plugins/kernel-netlink.opt \
96e61305 76 plugins/kernel-pfkey.opt \
828815b0
TB
77 plugins/kernel-pfroute.opt \
78 plugins/load-tester.opt \
79 plugins/lookip.opt \
80 plugins/ntru.opt \
81 plugins/openssl.opt \
486d7b26 82 plugins/osx-attr.opt \
276acafa 83 plugins/p-cscf.opt \
828815b0
TB
84 plugins/pkcs11.opt \
85 plugins/radattr.opt \
86 plugins/random.opt \
87 plugins/resolve.opt \
e3f63c64 88 plugins/revocation.opt \
345cd468 89 plugins/save-keys.opt \
828815b0
TB
90 plugins/socket-default.opt \
91 plugins/sql.opt \
92 plugins/stroke.opt \
93 plugins/systime-fix.opt \
94 plugins/tnc-ifmap.opt \
4576f7f9
TB
95 plugins/tnc-imc.opt \
96 plugins/tnc-imv.opt \
828815b0 97 plugins/tnc-pdp.opt \
4576f7f9
TB
98 plugins/tnccs-11.opt \
99 plugins/tnccs-20.opt \
2b233c8a 100 plugins/tpm.opt \
828815b0
TB
101 plugins/unbound.opt \
102 plugins/updown.opt \
7dbf9e15 103 plugins/vici.opt \
828815b0 104 plugins/whitelist.opt \
d3329ee5 105 plugins/wolfssl.opt \
828815b0
TB
106 plugins/xauth-eap.opt \
107 plugins/xauth-pam.opt
1b98f858
TB
108
109alloptions = $(options) $(plugins)
110
111confsnippets = $(alloptions:opt=conf)
112
113# we only install snippets for enabled plugins
114plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
115plugins_install_src = $(charon_plugins:%=plugins/%.conf)
7573a7ed
TB
116# only install snippets for enabled components
117# has to be defined via autoconf as we can't do it with automake conditionals
118options_install_src = $(strongswan_options:%=options/%.conf)
6a2de77f 119
7f535b39
TB
120templates_DATA = strongswan.conf
121optionstemplate_DATA = $(options_install_src)
122pluginstemplate_DATA = $(plugins_install_src)
91cc523c
TB
123man_MANS = \
124 strongswan.conf.5
1b98f858 125
7f62b7d0 126BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
1b98f858 127EXTRA_DIST = format-options.py strongswan.conf default.opt \
7f62b7d0 128 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
1b98f858 129
91cc523c
TB
130CLEANFILES=$(man_MANS)
131
1b98f858
TB
132.opt.conf:
133 $(AM_V_GEN) \
134 case "$<" in \
135 *plugins/*) \
136 sed \
137 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
138 $(srcdir)/default.opt | cat - $< | \
139 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
140 ;; \
141 *) \
142 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
143 ;; \
144 esac
145
146# we need another implicit rule to generate files from the generic template only
147# if the rules above did not catch it. this requires an intermediate step that
148# generates a copy of the generic config template.
149$(plugins_install_tmp):
d56a23c5
TB
150 @mkdir -p $(builddir)/plugins
151 @cp $(srcdir)/default.conf $(builddir)/$@
1b98f858
TB
152
153.tmp.conf:
154 $(AM_V_GEN) \
155 sed \
156 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
d56a23c5 157 $(builddir)/$< > $(builddir)/$@
1b98f858 158
7f62b7d0
TB
159strongswan.conf.5.main: $(alloptions)
160 $(AM_V_GEN) \
bd1c9f1e 161 cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@
7f62b7d0 162
bd1c9f1e 163strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
c4bb26b8 164 $(AM_V_GEN) \
bd1c9f1e 165 cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@
c4bb26b8 166
d56a23c5
TB
167clean-local:
168 rm -f plugins/*.conf plugins/*.tmp
169
1b98f858
TB
170maintainer-clean-local:
171 cd $(srcdir) && \
172 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
173
6a2de77f 174install-data-local: $(plugins_install_src)
0efea2fd
SL
175 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" || true
176 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" || true
177 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" || true
d49ad922 178 test -e "$(DESTDIR)$(strongswan_conf)" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswan_conf) || true
6a2de77f
TB
179 for f in $(options_install_src); do \
180 name=`basename $$f`; \
5645ad29 181 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \
6a2de77f
TB
182 done
183 for f in $(plugins_install_src); do \
184 name=`basename $$f`; \
d56a23c5 185 if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
5645ad29 186 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \
6a2de77f 187 done