From 784fe52e859c517078b39c29da6ea5cb2052e7b7 Mon Sep 17 00:00:00 2001 From: brendan Date: Fri, 20 Jun 2003 04:01:31 +0000 Subject: [PATCH] Whoops! make install could overwrite an existing icecast.xml. Install icecast.xml.dist in doc Install as $(sysconfdir)/icecast.xml only if that file doesn't already exist. svn path=/trunk/icecast/; revision=4983 --- conf/Makefile.am | 12 +++++++++--- conf/icecast.xml.in | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/conf/Makefile.am b/conf/Makefile.am index 658eb1b5..48894f9f 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -4,14 +4,20 @@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = icecast.xml.in -sysconf_DATA = icecast.xml +docdir = $(datadir)/$(PACKAGE)/doc +doc_DATA = icecast.xml.dist + +install-data-hook: + $(mkinstalldirs) $(DESTDIR)$(sysconfdir) + test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \ + $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml edit = sed -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ -e 's,@localstatedir\@,$(localstatedir),g' \ -e 's,@PACKAGE\@,$(PACKAGE),g' -icecast.xml: $(srcdir)/icecast.xml.in - $(edit) $(srcdir)/icecast.xml.in > icecast.xml +icecast.xml.dist: $(srcdir)/icecast.xml.in + $(edit) $(srcdir)/icecast.xml.in > icecast.xml.dist debug: $(MAKE) all CFLAGS="@DEBUG@" diff --git a/conf/icecast.xml.in b/conf/icecast.xml.in index ffb6038f..63f980bc 100644 --- a/conf/icecast.xml.in +++ b/conf/icecast.xml.in @@ -88,7 +88,7 @@ - @localstatedir@/@PACKAGE@/logs + @localstatedir@/log/@PACKAGE@ @pkgdatadir@/web @pkgdatadir@/admin