2014-01-23 15:44:12 +00:00
|
|
|
# make this relative to the location of strongswan.conf
|
|
|
|
strongswanconfdir = `dirname $(strongswan_conf)`
|
|
|
|
strongswanddir = $(strongswanconfdir)/strongswan.d
|
|
|
|
charonconfdir = $(strongswanddir)/charon
|
2014-02-06 17:03:23 +00:00
|
|
|
# copy these files also to /usr/share
|
|
|
|
templatesdir = $(pkgdatadir)/templates/config
|
|
|
|
optionstemplatedir = $(templatesdir)/strongswan.d
|
|
|
|
pluginstemplatedir = $(templatesdir)/plugins
|
2014-01-23 13:38:03 +00:00
|
|
|
|
2014-01-23 15:44:12 +00:00
|
|
|
options = \
|
2014-02-07 13:44:19 +00:00
|
|
|
options/attest.opt \
|
2014-02-03 10:36:49 +00:00
|
|
|
options/charon.opt \
|
2014-02-07 12:49:28 +00:00
|
|
|
options/charon-logging.opt \
|
2014-02-07 13:20:53 +00:00
|
|
|
options/imcv.opt \
|
2014-02-07 15:20:39 +00:00
|
|
|
options/manager.opt \
|
|
|
|
options/medsrv.opt \
|
2014-02-07 13:20:53 +00:00
|
|
|
options/pacman.opt \
|
2014-02-07 15:20:39 +00:00
|
|
|
options/pool.opt \
|
|
|
|
options/starter.opt \
|
|
|
|
options/tnc.opt \
|
|
|
|
options/tools.opt
|
2014-01-23 15:44:12 +00:00
|
|
|
|
|
|
|
plugins = \
|
2014-02-03 17:43:10 +00:00
|
|
|
plugins/android_log.opt \
|
|
|
|
plugins/attr.opt \
|
|
|
|
plugins/attr-sql.opt \
|
|
|
|
plugins/certexpire.opt \
|
|
|
|
plugins/coupling.opt \
|
|
|
|
plugins/dhcp.opt \
|
|
|
|
plugins/dnscert.opt \
|
|
|
|
plugins/duplicheck.opt \
|
|
|
|
plugins/eap-aka.opt \
|
|
|
|
plugins/eap-aka-3ggp2.opt \
|
|
|
|
plugins/eap-dynamic.opt \
|
|
|
|
plugins/eap-gtc.opt \
|
|
|
|
plugins/eap-peap.opt \
|
|
|
|
plugins/eap-radius.opt \
|
|
|
|
plugins/eap-sim.opt \
|
|
|
|
plugins/eap-simaka-sql.opt \
|
|
|
|
plugins/eap-tls.opt \
|
|
|
|
plugins/eap-tnc.opt \
|
|
|
|
plugins/eap-ttls.opt \
|
|
|
|
plugins/error-notify.opt \
|
|
|
|
plugins/gcrypt.opt \
|
|
|
|
plugins/ha.opt \
|
2014-02-07 13:44:19 +00:00
|
|
|
plugins/imc-attestation.opt \
|
2014-02-07 13:20:53 +00:00
|
|
|
plugins/imc-os.opt \
|
|
|
|
plugins/imc-scanner.opt \
|
2014-02-07 13:44:19 +00:00
|
|
|
plugins/imc-swid.opt \
|
2014-02-07 13:20:53 +00:00
|
|
|
plugins/imc-test.opt \
|
2014-02-07 13:44:19 +00:00
|
|
|
plugins/imv-attestation.opt \
|
2014-02-07 13:20:53 +00:00
|
|
|
plugins/imv-os.opt \
|
|
|
|
plugins/imv-scanner.opt \
|
|
|
|
plugins/imv-test.opt \
|
2014-02-03 17:43:10 +00:00
|
|
|
plugins/ipseckey.opt \
|
|
|
|
plugins/led.opt \
|
|
|
|
plugins/kernel-klips.opt \
|
|
|
|
plugins/kernel-libipsec.opt \
|
|
|
|
plugins/kernel-netlink.opt \
|
|
|
|
plugins/kernel-pfroute.opt \
|
|
|
|
plugins/load-tester.opt \
|
|
|
|
plugins/lookip.opt \
|
|
|
|
plugins/ntru.opt \
|
|
|
|
plugins/openssl.opt \
|
|
|
|
plugins/pkcs11.opt \
|
|
|
|
plugins/radattr.opt \
|
|
|
|
plugins/random.opt \
|
|
|
|
plugins/resolve.opt \
|
|
|
|
plugins/socket-default.opt \
|
|
|
|
plugins/sql.opt \
|
|
|
|
plugins/stroke.opt \
|
|
|
|
plugins/systime-fix.opt \
|
|
|
|
plugins/tnc-ifmap.opt \
|
2014-02-07 12:49:28 +00:00
|
|
|
plugins/tnc-imc.opt \
|
|
|
|
plugins/tnc-imv.opt \
|
2014-02-03 17:43:10 +00:00
|
|
|
plugins/tnc-pdp.opt \
|
2014-02-07 12:49:28 +00:00
|
|
|
plugins/tnccs-11.opt \
|
|
|
|
plugins/tnccs-20.opt \
|
2014-02-03 17:43:10 +00:00
|
|
|
plugins/unbound.opt \
|
|
|
|
plugins/updown.opt \
|
|
|
|
plugins/whitelist.opt \
|
|
|
|
plugins/xauth-eap.opt \
|
|
|
|
plugins/xauth-pam.opt
|
2014-01-23 15:44:12 +00:00
|
|
|
|
|
|
|
alloptions = $(options) $(plugins)
|
|
|
|
|
|
|
|
confsnippets = $(alloptions:opt=conf)
|
|
|
|
|
|
|
|
# we only install snippets for enabled plugins
|
|
|
|
plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
|
|
|
|
plugins_install_src = $(charon_plugins:%=plugins/%.conf)
|
2014-02-07 13:46:25 +00:00
|
|
|
# only install snippets for enabled components
|
|
|
|
# has to be defined via autoconf as we can't do it with automake conditionals
|
|
|
|
options_install_src = $(strongswan_options:%=options/%.conf)
|
2014-02-06 16:53:57 +00:00
|
|
|
|
2014-02-06 17:03:23 +00:00
|
|
|
templates_DATA = strongswan.conf
|
|
|
|
optionstemplate_DATA = $(options_install_src)
|
|
|
|
pluginstemplate_DATA = $(plugins_install_src)
|
2014-01-29 12:05:07 +00:00
|
|
|
man_MANS = \
|
|
|
|
strongswan.conf.5
|
2014-01-23 15:44:12 +00:00
|
|
|
|
2014-01-29 12:24:16 +00:00
|
|
|
BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
|
2014-01-23 15:44:12 +00:00
|
|
|
EXTRA_DIST = format-options.py strongswan.conf default.opt \
|
2014-01-29 12:24:16 +00:00
|
|
|
default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
|
2014-01-23 15:44:12 +00:00
|
|
|
|
2014-01-29 12:05:07 +00:00
|
|
|
CLEANFILES=$(man_MANS)
|
|
|
|
|
2014-01-23 15:44:12 +00:00
|
|
|
.opt.conf:
|
|
|
|
$(AM_V_GEN) \
|
|
|
|
case "$<" in \
|
|
|
|
*plugins/*) \
|
|
|
|
sed \
|
|
|
|
-e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
|
|
|
|
$(srcdir)/default.opt | cat - $< | \
|
|
|
|
$(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
$(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
|
|
|
|
;; \
|
|
|
|
esac
|
|
|
|
|
|
|
|
# we need another implicit rule to generate files from the generic template only
|
|
|
|
# if the rules above did not catch it. this requires an intermediate step that
|
|
|
|
# generates a copy of the generic config template.
|
|
|
|
$(plugins_install_tmp):
|
2014-01-29 13:03:16 +00:00
|
|
|
@mkdir -p $(builddir)/plugins
|
|
|
|
@cp $(srcdir)/default.conf $(builddir)/$@
|
2014-01-23 15:44:12 +00:00
|
|
|
|
|
|
|
.tmp.conf:
|
|
|
|
$(AM_V_GEN) \
|
|
|
|
sed \
|
|
|
|
-e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
|
2014-01-29 13:03:16 +00:00
|
|
|
$(builddir)/$< > $(builddir)/$@
|
2014-01-23 15:44:12 +00:00
|
|
|
|
2014-01-29 12:24:16 +00:00
|
|
|
strongswan.conf.5.main: $(alloptions)
|
|
|
|
$(AM_V_GEN) \
|
2014-02-27 10:40:32 +00:00
|
|
|
cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@
|
2014-01-29 12:24:16 +00:00
|
|
|
|
2014-02-27 10:40:32 +00:00
|
|
|
strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
|
2014-01-29 12:59:34 +00:00
|
|
|
$(AM_V_GEN) \
|
2014-02-27 10:40:32 +00:00
|
|
|
cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@
|
2014-01-29 12:59:34 +00:00
|
|
|
|
2014-01-29 13:03:16 +00:00
|
|
|
clean-local:
|
|
|
|
rm -f plugins/*.conf plugins/*.tmp
|
|
|
|
|
2014-01-23 15:44:12 +00:00
|
|
|
maintainer-clean-local:
|
|
|
|
cd $(srcdir) && \
|
|
|
|
rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
|
|
|
|
|
2014-02-06 16:53:57 +00:00
|
|
|
install-data-local: $(plugins_install_src)
|
2014-01-23 15:44:12 +00:00
|
|
|
test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
|
2014-02-06 16:53:57 +00:00
|
|
|
test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
|
|
|
|
test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
|
2014-02-12 14:16:57 +00:00
|
|
|
test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
|
2014-02-06 16:53:57 +00:00
|
|
|
for f in $(options_install_src); do \
|
|
|
|
name=`basename $$f`; \
|
2014-02-13 12:50:12 +00:00
|
|
|
test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \
|
2014-02-06 16:53:57 +00:00
|
|
|
done
|
|
|
|
for f in $(plugins_install_src); do \
|
|
|
|
name=`basename $$f`; \
|
2014-01-29 13:03:16 +00:00
|
|
|
if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
|
2014-02-13 12:50:12 +00:00
|
|
|
test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \
|
2014-02-06 16:53:57 +00:00
|
|
|
done
|