aboutsummaryrefslogtreecommitdiff
path: root/daemon.am
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-15 17:13:16 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-15 23:57:01 +0200
commitd2825c96141c7b6844d9e04f982919c0509165e1 (patch)
tree9acde9173ef7d8888468954a00a420a3b139ebfa /daemon.am
parent64720891ae7edc33f963651c5ba2509513b1849a (diff)
downloadgnu-guix-d2825c96141c7b6844d9e04f982919c0509165e1.tar
gnu-guix-d2825c96141c7b6844d9e04f982919c0509165e1.tar.gz
Add 'guix-daemon.service' file for systemd.
* etc/guix-daemon.service.in: New file, provided by Ricardo Wurmus. * daemon.am (CLEANFILES): Add etc/guix-daemon.service. (systemdservicedir, nodist_systemdservice_DATA): New variables. (EXTRA_DIST): Add etc/guix-daemon.service.in. * doc/guix.texi (Binary Installation, Build Environment Setup): Mention 'guix-daemon.service'.
Diffstat (limited to 'daemon.am')
-rw-r--r--daemon.am15
1 files changed, 13 insertions, 2 deletions
diff --git a/daemon.am b/daemon.am
index eecfea1c7e..1fee9b7e57 100644
--- a/daemon.am
+++ b/daemon.am
@@ -21,7 +21,7 @@
#
BUILT_SOURCES += nix/libstore/schema.sql.hh
-CLEANFILES += $(BUILT_SOURCES)
+CLEANFILES += $(BUILT_SOURCES) etc/guix-daemon.service
noinst_LIBRARIES = libformat.a libutil.a libstore.a
@@ -181,10 +181,21 @@ endif BUILD_DAEMON_OFFLOAD
nodist_libexec_SCRIPTS = \
nix/scripts/guix-authenticate
+# The '.service' file for systemd.
+systemdservicedir = $(libdir)/systemd/system
+nodist_systemdservice_DATA = etc/guix-daemon.service
+
+etc/guix-daemon.service: etc/guix-daemon.service.in \
+ $(top_builddir)/config.status
+ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "etc/guix-daemon.service.in" > "$@.tmp"
+ mv "$@.tmp" "$@"
+
EXTRA_DIST += \
nix/libstore/schema.sql \
nix/AUTHORS \
- nix/COPYING
+ nix/COPYING \
+ etc/guix-daemon.service.in
AM_TESTS_ENVIRONMENT += \
top_builddir="$(abs_top_builddir)"