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