]>
Commit | Line | Data |
---|---|---|
1b98f858 TB |
1 | # make this relative to the location of strongswan.conf |
2 | strongswanconfdir = `dirname $(strongswan_conf)` | |
3 | strongswanddir = $(strongswanconfdir)/strongswan.d | |
4 | charonconfdir = $(strongswanddir)/charon | |
7f535b39 TB |
5 | # copy these files also to /usr/share |
6 | templatesdir = $(pkgdatadir)/templates/config | |
7 | optionstemplatedir = $(templatesdir)/strongswan.d | |
8 | pluginstemplatedir = $(templatesdir)/plugins | |
c75acc4c | 9 | |
1b98f858 | 10 | options = \ |
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 TB |
22 | options/pool.opt \ |
23 | options/starter.opt \ | |
38f27e17 | 24 | options/swanctl.opt \ |
032a5767 | 25 | options/tnc.opt \ |
8aad7ffb | 26 | options/sec-updater.opt \ |
032a5767 | 27 | options/sw-collector.opt |
1b98f858 TB |
28 | |
29 | plugins = \ | |
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 \ |
4261fced | 35 | plugins/botan.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 \ | |
199c7083 | 82 | plugins/openxpki.opt \ |
486d7b26 | 83 | plugins/osx-attr.opt \ |
276acafa | 84 | plugins/p-cscf.opt \ |
828815b0 TB |
85 | plugins/pkcs11.opt \ |
86 | plugins/radattr.opt \ | |
87 | plugins/random.opt \ | |
88 | plugins/resolve.opt \ | |
e3f63c64 | 89 | plugins/revocation.opt \ |
345cd468 | 90 | plugins/save-keys.opt \ |
828815b0 TB |
91 | plugins/socket-default.opt \ |
92 | plugins/sql.opt \ | |
93 | plugins/stroke.opt \ | |
94 | plugins/systime-fix.opt \ | |
95 | plugins/tnc-ifmap.opt \ | |
4576f7f9 TB |
96 | plugins/tnc-imc.opt \ |
97 | plugins/tnc-imv.opt \ | |
828815b0 | 98 | plugins/tnc-pdp.opt \ |
4576f7f9 TB |
99 | plugins/tnccs-11.opt \ |
100 | plugins/tnccs-20.opt \ | |
2b233c8a | 101 | plugins/tpm.opt \ |
828815b0 TB |
102 | plugins/unbound.opt \ |
103 | plugins/updown.opt \ | |
7dbf9e15 | 104 | plugins/vici.opt \ |
828815b0 | 105 | plugins/whitelist.opt \ |
d3329ee5 | 106 | plugins/wolfssl.opt \ |
828815b0 TB |
107 | plugins/xauth-eap.opt \ |
108 | plugins/xauth-pam.opt | |
1b98f858 TB |
109 | |
110 | alloptions = $(options) $(plugins) | |
111 | ||
112 | confsnippets = $(alloptions:opt=conf) | |
113 | ||
114 | # we only install snippets for enabled plugins | |
115 | plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp) | |
116 | plugins_install_src = $(charon_plugins:%=plugins/%.conf) | |
7573a7ed TB |
117 | # only install snippets for enabled components |
118 | # has to be defined via autoconf as we can't do it with automake conditionals | |
119 | options_install_src = $(strongswan_options:%=options/%.conf) | |
6a2de77f | 120 | |
7f535b39 TB |
121 | templates_DATA = strongswan.conf |
122 | optionstemplate_DATA = $(options_install_src) | |
123 | pluginstemplate_DATA = $(plugins_install_src) | |
91cc523c TB |
124 | man_MANS = \ |
125 | strongswan.conf.5 | |
1b98f858 | 126 | |
7f62b7d0 | 127 | BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets) |
1b98f858 | 128 | EXTRA_DIST = format-options.py strongswan.conf default.opt \ |
7f62b7d0 | 129 | default.conf strongswan.conf.5.main $(alloptions) $(confsnippets) |
1b98f858 | 130 | |
91cc523c TB |
131 | CLEANFILES=$(man_MANS) |
132 | ||
1b98f858 TB |
133 | .opt.conf: |
134 | $(AM_V_GEN) \ | |
135 | case "$<" in \ | |
136 | *plugins/*) \ | |
137 | sed \ | |
138 | -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \ | |
139 | $(srcdir)/default.opt | cat - $< | \ | |
140 | $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \ | |
141 | ;; \ | |
142 | *) \ | |
143 | $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \ | |
144 | ;; \ | |
145 | esac | |
146 | ||
147 | # we need another implicit rule to generate files from the generic template only | |
148 | # if the rules above did not catch it. this requires an intermediate step that | |
149 | # generates a copy of the generic config template. | |
150 | $(plugins_install_tmp): | |
d56a23c5 TB |
151 | @mkdir -p $(builddir)/plugins |
152 | @cp $(srcdir)/default.conf $(builddir)/$@ | |
1b98f858 TB |
153 | |
154 | .tmp.conf: | |
155 | $(AM_V_GEN) \ | |
156 | sed \ | |
157 | -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \ | |
d56a23c5 | 158 | $(builddir)/$< > $(builddir)/$@ |
1b98f858 | 159 | |
7f62b7d0 TB |
160 | strongswan.conf.5.main: $(alloptions) |
161 | $(AM_V_GEN) \ | |
bd1c9f1e | 162 | cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@ |
7f62b7d0 | 163 | |
bd1c9f1e | 164 | strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail |
c4bb26b8 | 165 | $(AM_V_GEN) \ |
bd1c9f1e | 166 | cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@ |
c4bb26b8 | 167 | |
d56a23c5 TB |
168 | clean-local: |
169 | rm -f plugins/*.conf plugins/*.tmp | |
170 | ||
1b98f858 TB |
171 | maintainer-clean-local: |
172 | cd $(srcdir) && \ | |
173 | rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp | |
174 | ||
6a2de77f | 175 | install-data-local: $(plugins_install_src) |
0efea2fd SL |
176 | test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" || true |
177 | test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" || true | |
178 | test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" || true | |
d49ad922 | 179 | test -e "$(DESTDIR)$(strongswan_conf)" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswan_conf) || true |
6a2de77f TB |
180 | for f in $(options_install_src); do \ |
181 | name=`basename $$f`; \ | |
5645ad29 | 182 | test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \ |
6a2de77f TB |
183 | done |
184 | for f in $(plugins_install_src); do \ | |
185 | name=`basename $$f`; \ | |
d56a23c5 | 186 | if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \ |
5645ad29 | 187 | test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \ |
6a2de77f | 188 | done |