From 62fe452cc29d47d6e5d8996f85a04ea9c91ce252 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 4 May 2022 17:33:34 +0200 Subject: meson: add -Dsystemd-units-dir= meson command line option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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}. --- meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'meson.build') 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', -- cgit v1.3