aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-05-04 15:33:34 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-05-12 11:45:53 +0000
commit62fe452cc29d47d6e5d8996f85a04ea9c91ce252 (patch)
treec9b47887e837349e89706d5f8d84cd2de4386861 /meson.build
parentdoc: benchmarks: update with desktop results for 1.12.1 (r9) (diff)
meson: add -Dsystemd-units-dir=<path> meson command line option
This allows package maintainers to override the location to which our systemd service files are installed. It’s value is an *absolute* path, and *not* relative ${prefix}. The default is ${systemduserunitdir}.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 7280a049..e6f4f530 100644
--- a/meson.build
+++ b/meson.build
@@ -252,7 +252,13 @@ if systemd.found()
configuration = configuration_data()
configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
- systemd_units_dir = systemd.get_variable('systemduserunitdir')
+ custom_units_dir = get_option('systemd-units-dir')
+ if (custom_units_dir == '')
+ systemd_units_dir = systemd.get_variable('systemduserunitdir')
+ else
+ systemd_units_dir = custom_units_dir
+ endif
+
configure_file(
configuration: configuration,
input: 'foot-server@.service.in',