mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 07:37:21 +02:00
Add option to set systemd sysuser dir
This commit is contained in:
parent
4dc99dff76
commit
aee9703872
@ -24,7 +24,7 @@ if sd_bus_provider == 'systemd'
|
|||||||
# Install the sysusers.d file
|
# Install the sysusers.d file
|
||||||
install_data(
|
install_data(
|
||||||
files('gamemode.conf'),
|
files('gamemode.conf'),
|
||||||
install_dir: path_systemd_sysusers_dir,
|
install_dir: path_systemd_group_dir,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
14
meson.build
14
meson.build
@ -104,15 +104,18 @@ libdl = cc.find_library('dl', required: false)
|
|||||||
|
|
||||||
# Determine the location for the systemd unit
|
# Determine the location for the systemd unit
|
||||||
if sd_bus_provider == 'systemd'
|
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')
|
path_systemd_unit_dir = get_option('with-systemd-user-unit-dir')
|
||||||
if path_systemd_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')
|
pkgconfig_systemd = dependency('systemd')
|
||||||
path_systemd_unit_dir = pkgconfig_systemd.get_pkgconfig_variable('systemduserunitdir')
|
path_systemd_unit_dir = pkgconfig_systemd.get_pkgconfig_variable('systemduserunitdir')
|
||||||
endif
|
endif
|
||||||
pkgconfig_systemd = dependency('systemd')
|
path_systemd_group_dir = get_option('with-systemd-group-dir')
|
||||||
path_systemd_sysusers_dir = pkgconfig_systemd.get_pkgconfig_variable('sysusersdir')
|
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
|
endif
|
||||||
|
|
||||||
with_limits_conf = get_option('with-pam-group')
|
with_limits_conf = get_option('with-pam-group')
|
||||||
@ -203,6 +206,9 @@ if sd_bus_provider == 'systemd'
|
|||||||
report += [
|
report += [
|
||||||
' systemd user unit directory: @0@'.format(path_systemd_unit_dir),
|
' systemd user unit directory: @0@'.format(path_systemd_unit_dir),
|
||||||
]
|
]
|
||||||
|
report += [
|
||||||
|
' systemd group directory: @0@'.format(path_systemd_group_dir),
|
||||||
|
]
|
||||||
endif
|
endif
|
||||||
report += [
|
report += [
|
||||||
' D-BUS service directory: @0@'.format(path_dbus_service_dir),
|
' D-BUS service directory: @0@'.format(path_dbus_service_dir),
|
||||||
|
@ -6,6 +6,7 @@ option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'n
|
|||||||
|
|
||||||
# systemd specific
|
# systemd specific
|
||||||
option('with-systemd-user-unit-dir', type: 'string', description: 'Explicitly set the systemd user unit directory')
|
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
|
# Not using systemd
|
||||||
option('with-dbus-service-dir', type: 'string', description: 'Explicitly set the D-BUS session directory')
|
option('with-dbus-service-dir', type: 'string', description: 'Explicitly set the D-BUS session directory')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user