summaryrefslogtreecommitdiff
path: root/units/meson.build
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-11-12 08:01:39 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-12 11:21:46 +0100
commitd7aa78c32f076c305ceeb183fc06eb1de0960deb (patch)
treed7d262549dff0b1e195b1367616995241370d821 /units/meson.build
parentfaa73d4e0c8095fedd98ff29851b9634810ff97e (diff)
downloadsystemd-d7aa78c32f076c305ceeb183fc06eb1de0960deb.tar.gz
meson: add option to skip installing to $sysconfdir
This is useful for development where overwriting files out side the configured prefix will affect the host as well as stateless systems such as NixOS that don't let packages install to /etc but handle configuration on their own. Alternative to https://github.com/systemd/systemd/pull/17501 tested with: $ mkdir inst build && cd build $ meson \ -Dcreate-log-dirs=false \ -Dsysvrcnd-path=$(realpath ../inst)/etc/rc.d \ -Dsysvinit-path=$(realpath ../inst)/etc/init.d \ -Drootprefix=$(realpath ../inst) \ -Dinstall-sysconfdir=false \ --prefix=$(realpath ../inst) .. $ ninja install
Diffstat (limited to 'units/meson.build')
-rw-r--r--units/meson.build8
1 files changed, 5 insertions, 3 deletions
diff --git a/units/meson.build b/units/meson.build
index e249539dc8..ba60eb7fc1 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -326,9 +326,11 @@ install_data('user-.slice.d/10-defaults.conf',
############################################################
-meson.add_install_script(meson_make_symlink,
- join_paths(pkgsysconfdir, 'user'),
- join_paths(sysconfdir, 'xdg/systemd/user'))
+if install_sysconfdir
+ meson.add_install_script(meson_make_symlink,
+ join_paths(pkgsysconfdir, 'user'),
+ join_paths(sysconfdir, 'xdg/systemd/user'))
+endif
meson.add_install_script(meson_make_symlink,
join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))