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
13 options/charon-logging.opt \
25 plugins/android_log.opt \
27 plugins/attr-sql.opt \
28 plugins/certexpire.opt \
29 plugins/coupling.opt \
32 plugins/duplicheck.opt \
34 plugins/eap-aka-3ggp2.opt \
35 plugins/eap-dynamic.opt \
37 plugins/eap-peap.opt \
38 plugins/eap-radius.opt \
40 plugins/eap-simaka-sql.opt \
43 plugins/eap-ttls.opt \
44 plugins/error-notify.opt \
47 plugins/imc-attestation.opt \
49 plugins/imc-scanner.opt \
50 plugins/imc-swid.opt \
51 plugins/imc-test.opt \
52 plugins/imv-attestation.opt \
54 plugins/imv-scanner.opt \
55 plugins/imv-swid.opt \
56 plugins/imv-test.opt \
57 plugins/ipseckey.opt \
59 plugins/kernel-klips.opt \
60 plugins/kernel-libipsec.opt \
61 plugins/kernel-netlink.opt \
62 plugins/kernel-pfroute.opt \
63 plugins/load-tester.opt \
71 plugins/socket-default.opt \
74 plugins/systime-fix.opt \
75 plugins/tnc-ifmap.opt \
79 plugins/tnccs-11.opt \
80 plugins/tnccs-20.opt \
84 plugins/whitelist.opt \
85 plugins/xauth-eap.opt \
88 alloptions = $(options) $(plugins)
90 confsnippets = $(alloptions:opt=conf)
92 # we only install snippets for enabled plugins
93 plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
94 plugins_install_src = $(charon_plugins:%=plugins/%.conf)
95 # only install snippets for enabled components
96 # has to be defined via autoconf as we can't do it with automake conditionals
97 options_install_src = $(strongswan_options:%=options/%.conf)
99 templates_DATA = strongswan.conf
100 optionstemplate_DATA = $(options_install_src)
101 pluginstemplate_DATA = $(plugins_install_src)
105 BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
106 EXTRA_DIST = format-options.py strongswan.conf default.opt \
107 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
109 CLEANFILES=$(man_MANS)
116 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
117 $(srcdir)/default.opt | cat - $< | \
118 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
121 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
125 # we need another implicit rule to generate files from the generic template only
126 # if the rules above did not catch it. this requires an intermediate step that
127 # generates a copy of the generic config template.
128 $(plugins_install_tmp):
129 @mkdir -p $(builddir)/plugins
130 @cp $(srcdir)/default.conf $(builddir)/$@
135 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
136 $(builddir)/$< > $(builddir)/$@
138 strongswan.conf.5.main: $(alloptions)
140 cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@
142 strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
144 cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@
147 rm -f plugins/*.conf plugins/*.tmp
149 maintainer-clean-local:
151 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
153 install-data-local: $(plugins_install_src)
154 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
155 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
156 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
157 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
158 for f in $(options_install_src); do \
159 name=`basename $$f`; \
160 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \
162 for f in $(plugins_install_src); do \
163 name=`basename $$f`; \
164 if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
165 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \