Install the base peers.in file as ${configdir}/peers.d/10base as a
convenience to users. It's correct to clobber the user's old file,
since there's a fierce warning at the top of the file. (Make the
warning more fierce.)
Install the startup script configuration file (but not the script
itself), only if there isn't one already. This prevents us from
overwriting a user's customized configuration.
To prevent distcheck from failing, change the default of `initconfig' to
be ${sysconfdir}/tripe.conf; this is probably the right thing anyway.
[pidfile], [FILE], [process-id [[./tripectl.pid]]], [tripectl.pid])
TRIPE_DEFINE_PATH(
[pidfile], [FILE], [process-id [[./tripectl.pid]]], [tripectl.pid])
TRIPE_DEFINE_PATH(
- [initconfig], [FILE], [configuration for init script [[/etc/tripe.conf]]],
- [/etc/tripe.conf])
+ [initconfig], [FILE],
+ [configuration for init script [[SYSCONFDIR/tripe.conf]]],
+ ['${sysconfdir}/tripe.conf'])
TRIPE_DEFINE_PATH(
[logfile], [FILE], [logging output [[./tripe.log]]], [tripe.log])
TRIPE_DEFINE_PATH(
[logfile], [FILE], [logging output [[./tripe.log]]], [tripe.log])
## Configuration file for the script.
EXTRA_DIST += tripe.conf
## Configuration file for the script.
EXTRA_DIST += tripe.conf
+install-data-local:: tripe.conf
+ initconfig=$(initconfig) && dir=$${initconfig%/*} && \
+ $(MKDIR_P) $(DESTDIR)$$dir
+ test -f $(DESTDIR)$(initconfig) || \
+ $(INSTALL_SCRIPT) $(srcdir)/tripe.conf \
+ $(DESTDIR)$(initconfig)
+uninstall-local::
+ rm -f $(DESTDIR)$(initconfig)
## Necessary directories.
## Necessary directories.
for i in "$(configdir)" "$(socketdir)"; do \
case "$$i" in /*) $(MKDIR_P) $(DESTDIR)$$i ;; esac; \
done
for i in "$(configdir)" "$(socketdir)"; do \
case "$$i" in /*) $(MKDIR_P) $(DESTDIR)$$i ;; esac; \
done
sbin_SCRIPTS += tripe-newpeers
CLEANFILES += tripe-newpeers
EXTRA_DIST += tripe-newpeers.in
sbin_SCRIPTS += tripe-newpeers
CLEANFILES += tripe-newpeers
EXTRA_DIST += tripe-newpeers.in
tripe-newpeers: tripe-newpeers.in Makefile
$(confsubst) $(srcdir)/tripe-newpeers.in >$@.new \
tripe-newpeers: tripe-newpeers.in Makefile
$(confsubst) $(srcdir)/tripe-newpeers.in >$@.new \
CLEANFILES += tripe-newpeers.8
EXTRA_DIST += tripe-newpeers.8.in
CLEANFILES += tripe-newpeers.8
EXTRA_DIST += tripe-newpeers.8.in
+## Install peer database sources.
+EXTRA_DIST += peers.in
+
+install-data-local:: peers.in
+ $(MKDIR_P) $(DESTDIR)$(configdir)/peers.d
+ $(INSTALL_DATA) $(srcdir)/peers.in \
+ $(DESTDIR)$(configdir)/peers.d/10base
+uninstall-local::
+ rm -f $(DESTDIR)$(configdir)/peers.d/10base
+
###----- That's all, folks --------------------------------------------------
###----- That's all, folks --------------------------------------------------
;;;
;;; Peers description file
;;;
;;;
;;; Peers description file
;;;
-;;; You're best off not editing this file at all; instead, drop a file
-;;; containing your overriden settings alongside.
+;;; New installations will clobber this file. Therefore you're best off not
+;;; editing this file directly; instead, drop a file containing your
+;;; overridden settings alongside.
;;;--------------------------------------------------------------------------
;;; Global defaults.
;;;--------------------------------------------------------------------------
;;; Global defaults.