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