aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-02-06 17:53:57 +0100
committerTobias Brunner <tobias@strongswan.org>2014-02-12 14:34:34 +0100
commit6a2de77f2eb61f4d6fd78b49ac5d8b52b827a0ce (patch)
treecf23f4365acfc5f0b9eeccc15085047817d97708 /conf
parentfc380b175d56085852875b450303468d2839e9be (diff)
downloadstrongswan-6a2de77f2eb61f4d6fd78b49ac5d8b52b827a0ce.tar.bz2
strongswan-6a2de77f2eb61f4d6fd78b49ac5d8b52b827a0ce.tar.xz
conf: Only install config snippets if they don't exist yet
Diffstat (limited to 'conf')
-rw-r--r--conf/Makefile.am20
1 files changed, 13 insertions, 7 deletions
diff --git a/conf/Makefile.am b/conf/Makefile.am
index 977eb1242..2acea54cc 100644
--- a/conf/Makefile.am
+++ b/conf/Makefile.am
@@ -64,8 +64,8 @@ confsnippets = $(alloptions:opt=conf)
plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
plugins_install_src = $(charon_plugins:%=plugins/%.conf)
-strongswand_DATA = $(options:opt=conf)
-charonconf_DATA = $(plugins_install_src)
+options_install_src = $(options:opt=conf)
+
man_MANS = \
strongswan.conf.5
@@ -113,10 +113,16 @@ maintainer-clean-local:
cd $(srcdir) && \
rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
-install-exec-local:
+install-data-local: $(plugins_install_src)
test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
+ test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
+ test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 640 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
-
-install-data-hook:
- chmod 0640 $(DESTDIR)$(strongswanddir)/*.conf
- chmod 0640 $(DESTDIR)$(charonconfdir)/*.conf
+ for f in $(options_install_src); do \
+ name=`basename $$f`; \
+ test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(strongswanddir)" $(srcdir)/$$f || true; \
+ done
+ for f in $(plugins_install_src); do \
+ name=`basename $$f`; \
+ test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(charonconfdir)" $(srcdir)/$$f || true; \
+ done