diff --git a/data/meson.build b/data/meson.build index 6fb82d8..cbd845b 100644 --- a/data/meson.build +++ b/data/meson.build @@ -24,7 +24,7 @@ if sd_bus_provider == 'systemd' # Install the sysusers.d file install_data( files('gamemode.conf'), - install_dir: path_systemd_sysusers_dir, + install_dir: path_systemd_group_dir, ) endif diff --git a/meson.build b/meson.build index 9a0e8ba..09a73c7 100644 --- a/meson.build +++ b/meson.build @@ -104,15 +104,18 @@ libdl = cc.find_library('dl', required: false) # Determine the location for the systemd unit if sd_bus_provider == 'systemd' - # If the path isn't explicitly set, ask systemd for the systemd user unit directory path_systemd_unit_dir = get_option('with-systemd-user-unit-dir') if path_systemd_unit_dir == '' - message('Asking pkg-config for systemd\'s directories') + message('Asking pkg-config for systemd\'s \'systemduserunitdir\' directory') pkgconfig_systemd = dependency('systemd') path_systemd_unit_dir = pkgconfig_systemd.get_pkgconfig_variable('systemduserunitdir') endif - pkgconfig_systemd = dependency('systemd') - path_systemd_sysusers_dir = pkgconfig_systemd.get_pkgconfig_variable('sysusersdir') + path_systemd_group_dir = get_option('with-systemd-group-dir') + if path_systemd_group_dir == '' + message('Asking pkg-config for systemd\'s \'sysusersdir\' directory') + pkgconfig_systemd = dependency('systemd') + path_systemd_group_dir = pkgconfig_systemd.get_pkgconfig_variable('sysusersdir') + endif endif with_limits_conf = get_option('with-pam-group') @@ -203,6 +206,9 @@ if sd_bus_provider == 'systemd' report += [ ' systemd user unit directory: @0@'.format(path_systemd_unit_dir), ] +report += [ + ' systemd group directory: @0@'.format(path_systemd_group_dir), +] endif report += [ ' D-BUS service directory: @0@'.format(path_dbus_service_dir), diff --git a/meson_options.txt b/meson_options.txt index e3cf976..2d2746d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,7 @@ option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'n # systemd specific option('with-systemd-user-unit-dir', type: 'string', description: 'Explicitly set the systemd user unit directory') +option('with-systemd-group-dir', type: 'string', description: 'Explicitly set the systemd group directory') # Not using systemd option('with-dbus-service-dir', type: 'string', description: 'Explicitly set the D-BUS session directory')