1 # make this relative to the location of strongswan.conf
2 strongswanconfdir = `dirname $(strongswan_conf)`
3 strongswanddir = $(strongswanconfdir)/strongswan.d
4 charonconfdir = $(strongswanddir)/charon
12 alloptions = $(options) $(plugins)
14 confsnippets = $(alloptions:opt=conf)
16 # we only install snippets for enabled plugins
17 plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
18 plugins_install_src = $(charon_plugins:%=plugins/%.conf)
20 strongswand_DATA = $(options:opt=conf)
21 charonconf_DATA = $(plugins_install_src)
23 BUILT_SOURCES = default.conf $(confsnippets)
24 EXTRA_DIST = format-options.py strongswan.conf default.opt \
25 default.conf $(alloptions) $(confsnippets)
32 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
33 $(srcdir)/default.opt | cat - $< | \
34 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
37 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
41 # we need another implicit rule to generate files from the generic template only
42 # if the rules above did not catch it. this requires an intermediate step that
43 # generates a copy of the generic config template.
44 $(plugins_install_tmp):
45 @cp $(srcdir)/default.conf $(srcdir)/$@
50 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
51 $(srcdir)/$< > $(srcdir)/$@
53 maintainer-clean-local:
55 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
58 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
59 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 640 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
62 chmod 0640 $(DESTDIR)$(strongswanddir)/*.conf
63 chmod 0640 $(DESTDIR)$(charonconfdir)/*.conf