]> git.ipfire.org Git - thirdparty/strongswan.git/blame - conf/Makefile.am
conf: Move load-tester options to plugin specific file
[thirdparty/strongswan.git] / conf / Makefile.am
CommitLineData
1b98f858
TB
1# make this relative to the location of strongswan.conf
2strongswanconfdir = `dirname $(strongswan_conf)`
3strongswanddir = $(strongswanconfdir)/strongswan.d
4charonconfdir = $(strongswanddir)/charon
c75acc4c 5
1b98f858 6options = \
da8b16a1
TB
7 options/charon.opt \
8 options/charon-logging.opt
1b98f858
TB
9
10plugins = \
828815b0
TB
11 plugins/android_log.opt \
12 plugins/attr.opt \
13 plugins/attr-sql.opt \
14 plugins/certexpire.opt \
15 plugins/coupling.opt \
16 plugins/dhcp.opt \
17 plugins/dnscert.opt \
18 plugins/duplicheck.opt \
19 plugins/eap-aka.opt \
20 plugins/eap-aka-3ggp2.opt \
21 plugins/eap-dynamic.opt \
22 plugins/eap-gtc.opt \
23 plugins/eap-peap.opt \
24 plugins/eap-radius.opt \
25 plugins/eap-sim.opt \
26 plugins/eap-simaka-sql.opt \
27 plugins/eap-tls.opt \
28 plugins/eap-tnc.opt \
29 plugins/eap-ttls.opt \
30 plugins/error-notify.opt \
31 plugins/gcrypt.opt \
32 plugins/ha.opt \
33 plugins/ipseckey.opt \
34 plugins/led.opt \
35 plugins/kernel-klips.opt \
36 plugins/kernel-libipsec.opt \
37 plugins/kernel-netlink.opt \
38 plugins/kernel-pfroute.opt \
39 plugins/load-tester.opt \
40 plugins/lookip.opt \
41 plugins/ntru.opt \
42 plugins/openssl.opt \
43 plugins/pkcs11.opt \
44 plugins/radattr.opt \
45 plugins/random.opt \
46 plugins/resolve.opt \
47 plugins/socket-default.opt \
48 plugins/sql.opt \
49 plugins/stroke.opt \
50 plugins/systime-fix.opt \
51 plugins/tnc-ifmap.opt \
52 plugins/tnc-pdp.opt \
53 plugins/unbound.opt \
54 plugins/updown.opt \
55 plugins/whitelist.opt \
56 plugins/xauth-eap.opt \
57 plugins/xauth-pam.opt
1b98f858
TB
58
59alloptions = $(options) $(plugins)
60
61confsnippets = $(alloptions:opt=conf)
62
63# we only install snippets for enabled plugins
64plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
65plugins_install_src = $(charon_plugins:%=plugins/%.conf)
66
67strongswand_DATA = $(options:opt=conf)
68charonconf_DATA = $(plugins_install_src)
91cc523c
TB
69man_MANS = \
70 strongswan.conf.5
1b98f858 71
7f62b7d0 72BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
1b98f858 73EXTRA_DIST = format-options.py strongswan.conf default.opt \
7f62b7d0 74 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
1b98f858 75
91cc523c
TB
76CLEANFILES=$(man_MANS)
77
1b98f858
TB
78.opt.conf:
79 $(AM_V_GEN) \
80 case "$<" in \
81 *plugins/*) \
82 sed \
83 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
84 $(srcdir)/default.opt | cat - $< | \
85 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
86 ;; \
87 *) \
88 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
89 ;; \
90 esac
91
92# we need another implicit rule to generate files from the generic template only
93# if the rules above did not catch it. this requires an intermediate step that
94# generates a copy of the generic config template.
95$(plugins_install_tmp):
96 @cp $(srcdir)/default.conf $(srcdir)/$@
97
98.tmp.conf:
99 $(AM_V_GEN) \
100 sed \
101 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
102 $(srcdir)/$< > $(srcdir)/$@
103
7f62b7d0
TB
104strongswan.conf.5.main: $(alloptions)
105 $(AM_V_GEN) \
106 $(PYTHON) $(srcdir)/format-options.py -f man $^ > $@
107
c4bb26b8
TB
108strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
109 $(AM_V_GEN) \
110 cat $^ > $@
111
1b98f858
TB
112maintainer-clean-local:
113 cd $(srcdir) && \
114 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
115
116install-exec-local:
117 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
118 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 640 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
119
120install-data-hook:
121 chmod 0640 $(DESTDIR)$(strongswanddir)/*.conf
122 chmod 0640 $(DESTDIR)$(charonconfdir)/*.conf