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 \
19 plugins/android_log.opt \
21 plugins/attr-sql.opt \
22 plugins/certexpire.opt \
23 plugins/coupling.opt \
26 plugins/duplicheck.opt \
28 plugins/eap-aka-3ggp2.opt \
29 plugins/eap-dynamic.opt \
31 plugins/eap-peap.opt \
32 plugins/eap-radius.opt \
34 plugins/eap-simaka-sql.opt \
37 plugins/eap-ttls.opt \
38 plugins/error-notify.opt \
41 plugins/imc-attestation.opt \
43 plugins/imc-scanner.opt \
44 plugins/imc-swid.opt \
45 plugins/imc-test.opt \
46 plugins/imv-attestation.opt \
48 plugins/imv-scanner.opt \
49 plugins/imv-test.opt \
50 plugins/ipseckey.opt \
52 plugins/kernel-klips.opt \
53 plugins/kernel-libipsec.opt \
54 plugins/kernel-netlink.opt \
55 plugins/kernel-pfroute.opt \
56 plugins/load-tester.opt \
64 plugins/socket-default.opt \
67 plugins/systime-fix.opt \
68 plugins/tnc-ifmap.opt \
72 plugins/tnccs-11.opt \
73 plugins/tnccs-20.opt \
76 plugins/whitelist.opt \
77 plugins/xauth-eap.opt \
80 alloptions = $(options) $(plugins)
82 confsnippets = $(alloptions:opt=conf)
84 # we only install snippets for enabled plugins
85 plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
86 plugins_install_src = $(charon_plugins:%=plugins/%.conf)
88 options_install_src = $(options:opt=conf)
90 templates_DATA = strongswan.conf
91 optionstemplate_DATA = $(options_install_src)
92 pluginstemplate_DATA = $(plugins_install_src)
96 BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
97 EXTRA_DIST = format-options.py strongswan.conf default.opt \
98 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
100 CLEANFILES=$(man_MANS)
107 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
108 $(srcdir)/default.opt | cat - $< | \
109 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
112 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
116 # we need another implicit rule to generate files from the generic template only
117 # if the rules above did not catch it. this requires an intermediate step that
118 # generates a copy of the generic config template.
119 $(plugins_install_tmp):
120 @mkdir -p $(builddir)/plugins
121 @cp $(srcdir)/default.conf $(builddir)/$@
126 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
127 $(builddir)/$< > $(builddir)/$@
129 strongswan.conf.5.main: $(alloptions)
131 $(PYTHON) $(srcdir)/format-options.py -f man $^ > $@
133 strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
138 rm -f plugins/*.conf plugins/*.tmp
140 maintainer-clean-local:
142 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
144 install-data-local: $(plugins_install_src)
145 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
146 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
147 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
148 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 640 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
149 for f in $(options_install_src); do \
150 name=`basename $$f`; \
151 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(strongswanddir)" $(srcdir)/$$f || true; \
153 for f in $(plugins_install_src); do \
154 name=`basename $$f`; \
155 if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
156 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(charonconfdir)" "$$dir$$f" || true; \