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