]> git.ipfire.org Git - people/ms/strongswan.git/blame - conf/Makefile.am
Migration from Debian 7.4 to 7.5
[people/ms/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
7f535b39
TB
5# copy these files also to /usr/share
6templatesdir = $(pkgdatadir)/templates/config
7optionstemplatedir = $(templatesdir)/strongswan.d
8pluginstemplatedir = $(templatesdir)/plugins
c75acc4c 9
1b98f858 10options = \
5ac75787 11 options/attest.opt \
da8b16a1 12 options/charon.opt \
4576f7f9 13 options/charon-logging.opt \
bf3f4bf7 14 options/imcv.opt \
ff94fe15
TB
15 options/manager.opt \
16 options/medsrv.opt \
bf3f4bf7 17 options/pacman.opt \
ff94fe15
TB
18 options/pool.opt \
19 options/starter.opt \
20 options/tnc.opt \
21 options/tools.opt
1b98f858
TB
22
23plugins = \
828815b0
TB
24 plugins/android_log.opt \
25 plugins/attr.opt \
26 plugins/attr-sql.opt \
27 plugins/certexpire.opt \
28 plugins/coupling.opt \
29 plugins/dhcp.opt \
30 plugins/dnscert.opt \
31 plugins/duplicheck.opt \
32 plugins/eap-aka.opt \
33 plugins/eap-aka-3ggp2.opt \
34 plugins/eap-dynamic.opt \
35 plugins/eap-gtc.opt \
36 plugins/eap-peap.opt \
37 plugins/eap-radius.opt \
38 plugins/eap-sim.opt \
39 plugins/eap-simaka-sql.opt \
40 plugins/eap-tls.opt \
41 plugins/eap-tnc.opt \
42 plugins/eap-ttls.opt \
43 plugins/error-notify.opt \
44 plugins/gcrypt.opt \
45 plugins/ha.opt \
5ac75787 46 plugins/imc-attestation.opt \
bf3f4bf7
TB
47 plugins/imc-os.opt \
48 plugins/imc-scanner.opt \
5ac75787 49 plugins/imc-swid.opt \
bf3f4bf7 50 plugins/imc-test.opt \
5ac75787 51 plugins/imv-attestation.opt \
bf3f4bf7
TB
52 plugins/imv-os.opt \
53 plugins/imv-scanner.opt \
54 plugins/imv-test.opt \
828815b0
TB
55 plugins/ipseckey.opt \
56 plugins/led.opt \
57 plugins/kernel-klips.opt \
58 plugins/kernel-libipsec.opt \
59 plugins/kernel-netlink.opt \
60 plugins/kernel-pfroute.opt \
61 plugins/load-tester.opt \
62 plugins/lookip.opt \
63 plugins/ntru.opt \
64 plugins/openssl.opt \
65 plugins/pkcs11.opt \
66 plugins/radattr.opt \
67 plugins/random.opt \
68 plugins/resolve.opt \
69 plugins/socket-default.opt \
70 plugins/sql.opt \
71 plugins/stroke.opt \
72 plugins/systime-fix.opt \
73 plugins/tnc-ifmap.opt \
4576f7f9
TB
74 plugins/tnc-imc.opt \
75 plugins/tnc-imv.opt \
828815b0 76 plugins/tnc-pdp.opt \
4576f7f9
TB
77 plugins/tnccs-11.opt \
78 plugins/tnccs-20.opt \
828815b0
TB
79 plugins/unbound.opt \
80 plugins/updown.opt \
7dbf9e15 81 plugins/vici.opt \
828815b0
TB
82 plugins/whitelist.opt \
83 plugins/xauth-eap.opt \
84 plugins/xauth-pam.opt
1b98f858
TB
85
86alloptions = $(options) $(plugins)
87
88confsnippets = $(alloptions:opt=conf)
89
90# we only install snippets for enabled plugins
91plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
92plugins_install_src = $(charon_plugins:%=plugins/%.conf)
7573a7ed
TB
93# only install snippets for enabled components
94# has to be defined via autoconf as we can't do it with automake conditionals
95options_install_src = $(strongswan_options:%=options/%.conf)
6a2de77f 96
7f535b39
TB
97templates_DATA = strongswan.conf
98optionstemplate_DATA = $(options_install_src)
99pluginstemplate_DATA = $(plugins_install_src)
91cc523c
TB
100man_MANS = \
101 strongswan.conf.5
1b98f858 102
7f62b7d0 103BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
1b98f858 104EXTRA_DIST = format-options.py strongswan.conf default.opt \
7f62b7d0 105 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
1b98f858 106
91cc523c
TB
107CLEANFILES=$(man_MANS)
108
1b98f858
TB
109.opt.conf:
110 $(AM_V_GEN) \
111 case "$<" in \
112 *plugins/*) \
113 sed \
114 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
115 $(srcdir)/default.opt | cat - $< | \
116 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
117 ;; \
118 *) \
119 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
120 ;; \
121 esac
122
123# we need another implicit rule to generate files from the generic template only
124# if the rules above did not catch it. this requires an intermediate step that
125# generates a copy of the generic config template.
126$(plugins_install_tmp):
d56a23c5
TB
127 @mkdir -p $(builddir)/plugins
128 @cp $(srcdir)/default.conf $(builddir)/$@
1b98f858
TB
129
130.tmp.conf:
131 $(AM_V_GEN) \
132 sed \
133 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
d56a23c5 134 $(builddir)/$< > $(builddir)/$@
1b98f858 135
7f62b7d0
TB
136strongswan.conf.5.main: $(alloptions)
137 $(AM_V_GEN) \
bd1c9f1e 138 cd $(srcdir) && $(PYTHON) format-options.py -f man $(alloptions) > $@
7f62b7d0 139
bd1c9f1e 140strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
c4bb26b8 141 $(AM_V_GEN) \
bd1c9f1e 142 cat strongswan.conf.5.head $(srcdir)/strongswan.conf.5.main strongswan.conf.5.tail > $@
c4bb26b8 143
d56a23c5
TB
144clean-local:
145 rm -f plugins/*.conf plugins/*.tmp
146
1b98f858
TB
147maintainer-clean-local:
148 cd $(srcdir) && \
149 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
150
6a2de77f 151install-data-local: $(plugins_install_src)
1b98f858 152 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
6a2de77f
TB
153 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
154 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
efce4559 155 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 644 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
6a2de77f
TB
156 for f in $(options_install_src); do \
157 name=`basename $$f`; \
5645ad29 158 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 644 "$(srcdir)/$$f" "$(DESTDIR)$(strongswanddir)/$$name" || true; \
6a2de77f
TB
159 done
160 for f in $(plugins_install_src); do \
161 name=`basename $$f`; \
d56a23c5 162 if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \
5645ad29 163 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 644 "$$dir$$f" "$(DESTDIR)$(charonconfdir)/$$name" || true; \
6a2de77f 164 done