mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 23:57:22 +02:00
Add options to disable installing systemd specific files
This commit is contained in:
parent
aee9703872
commit
e34e9c5a43
@ -14,18 +14,22 @@ config_example = run_command(
|
|||||||
data_conf.set('GAMEMODE_EXAMPLE_CONFIG', config_example)
|
data_conf.set('GAMEMODE_EXAMPLE_CONFIG', config_example)
|
||||||
|
|
||||||
if sd_bus_provider == 'systemd'
|
if sd_bus_provider == 'systemd'
|
||||||
# Install systemd user unit
|
if with_systemd_unit
|
||||||
configure_file(
|
# Install systemd user unit
|
||||||
input: 'gamemoded.service.in',
|
configure_file(
|
||||||
output: 'gamemoded.service',
|
input: 'gamemoded.service.in',
|
||||||
configuration: data_conf,
|
output: 'gamemoded.service',
|
||||||
install_dir: path_systemd_unit_dir,
|
configuration: data_conf,
|
||||||
)
|
install_dir: path_systemd_unit_dir,
|
||||||
# Install the sysusers.d file
|
)
|
||||||
install_data(
|
endif
|
||||||
files('gamemode.conf'),
|
if with_systemd_group
|
||||||
install_dir: path_systemd_group_dir,
|
# Install the sysusers.d file
|
||||||
)
|
install_data(
|
||||||
|
files('gamemode.conf'),
|
||||||
|
install_dir: path_systemd_group_dir,
|
||||||
|
)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Install the D-BUS service file
|
# Install the D-BUS service file
|
||||||
|
30
meson.build
30
meson.build
@ -104,17 +104,23 @@ 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'
|
||||||
path_systemd_unit_dir = get_option('with-systemd-user-unit-dir')
|
with_systemd_unit = get_option('with-systemd-user-unit')
|
||||||
if path_systemd_unit_dir == ''
|
if with_systemd_unit
|
||||||
message('Asking pkg-config for systemd\'s \'systemduserunitdir\' directory')
|
path_systemd_unit_dir = get_option('with-systemd-user-unit-dir')
|
||||||
pkgconfig_systemd = dependency('systemd')
|
if path_systemd_unit_dir == ''
|
||||||
path_systemd_unit_dir = pkgconfig_systemd.get_pkgconfig_variable('systemduserunitdir')
|
message('Asking pkg-config for systemd\'s \'systemduserunitdir\' directory')
|
||||||
|
pkgconfig_systemd = dependency('systemd')
|
||||||
|
path_systemd_unit_dir = pkgconfig_systemd.get_pkgconfig_variable('systemduserunitdir')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
path_systemd_group_dir = get_option('with-systemd-group-dir')
|
with_systemd_group = get_option('with-systemd-group')
|
||||||
if path_systemd_group_dir == ''
|
if with_systemd_group
|
||||||
message('Asking pkg-config for systemd\'s \'sysusersdir\' directory')
|
path_systemd_group_dir = get_option('with-systemd-group-dir')
|
||||||
pkgconfig_systemd = dependency('systemd')
|
if path_systemd_group_dir == ''
|
||||||
path_systemd_group_dir = pkgconfig_systemd.get_pkgconfig_variable('sysusersdir')
|
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
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -203,13 +209,17 @@ report = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if sd_bus_provider == 'systemd'
|
if sd_bus_provider == 'systemd'
|
||||||
|
if with_systemd_unit
|
||||||
report += [
|
report += [
|
||||||
' systemd user unit directory: @0@'.format(path_systemd_unit_dir),
|
' systemd user unit directory: @0@'.format(path_systemd_unit_dir),
|
||||||
]
|
]
|
||||||
|
endif
|
||||||
|
if with_systemd_group
|
||||||
report += [
|
report += [
|
||||||
' systemd group directory: @0@'.format(path_systemd_group_dir),
|
' systemd group directory: @0@'.format(path_systemd_group_dir),
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
report += [
|
report += [
|
||||||
' D-BUS service directory: @0@'.format(path_dbus_service_dir),
|
' D-BUS service directory: @0@'.format(path_dbus_service_dir),
|
||||||
]
|
]
|
||||||
|
@ -5,7 +5,9 @@ option('with-pam-group', type: 'string', description: 'Install the limits.d conf
|
|||||||
option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'no-daemon'], value: 'systemd')
|
option('with-sd-bus-provider', type: 'combo', choices: ['systemd', 'elogind', 'no-daemon'], value: 'systemd')
|
||||||
|
|
||||||
# systemd specific
|
# systemd specific
|
||||||
|
option('with-systemd-user-unit', type: 'boolean', description: 'Install systemd user unit', value: 'true')
|
||||||
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', type: 'boolean', description: 'Install systemd group', value: 'true')
|
||||||
option('with-systemd-group-dir', type: 'string', description: 'Explicitly set the systemd group directory')
|
option('with-systemd-group-dir', type: 'string', description: 'Explicitly set the systemd group directory')
|
||||||
|
|
||||||
# Not using systemd
|
# Not using systemd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user