look for an init system and auto install based on what is found
This commit is contained in:
parent
49d5a9bbee
commit
8f0bf4a6bc
@ -1,5 +1,3 @@
|
|||||||
openrc = get_option('openrc')
|
|
||||||
|
|
||||||
openrc_config_data = configuration_data()
|
openrc_config_data = configuration_data()
|
||||||
openrc_config_data.set('SBINDIR', join_paths(get_option('prefix'), get_option('sbindir')))
|
openrc_config_data.set('SBINDIR', join_paths(get_option('prefix'), get_option('sbindir')))
|
||||||
openrc_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
openrc_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||||
@ -10,7 +8,9 @@ openrc_config_data_file = configure_file(
|
|||||||
configuration: openrc_config_data
|
configuration: openrc_config_data
|
||||||
)
|
)
|
||||||
|
|
||||||
if openrc
|
openrc = find_program ('openrc', required: false)
|
||||||
|
|
||||||
|
if openrc.found()
|
||||||
install_data(
|
install_data(
|
||||||
openrc_config_data_file,
|
openrc_config_data_file,
|
||||||
install_dir: join_paths(get_option('sysconfdir'), 'init.d')
|
install_dir: join_paths(get_option('sysconfdir'), 'init.d')
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
runit = get_option('runit')
|
|
||||||
|
|
||||||
runit_config_data = configuration_data()
|
runit_config_data = configuration_data()
|
||||||
runit_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
runit_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||||
|
|
||||||
@ -9,7 +7,9 @@ runit_config_data_file = configure_file(
|
|||||||
configuration: runit_config_data
|
configuration: runit_config_data
|
||||||
)
|
)
|
||||||
|
|
||||||
if runit
|
runit = find_program ('runit', required: false)
|
||||||
|
|
||||||
|
if runit.found()
|
||||||
install_data(
|
install_data(
|
||||||
runit_config_data_file,
|
runit_config_data_file,
|
||||||
install_dir: join_paths(get_option('sysconfdir'), 'runit', 'sv', 'tufmanager')
|
install_dir: join_paths(get_option('sysconfdir'), 'runit', 'sv', 'tufmanager')
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
s6 = get_option('s6')
|
|
||||||
|
|
||||||
s6_config_data = configuration_data()
|
s6_config_data = configuration_data()
|
||||||
s6_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
s6_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||||
|
|
||||||
@ -9,7 +7,9 @@ s6_config_data_file = configure_file(
|
|||||||
configuration: s6_config_data
|
configuration: s6_config_data
|
||||||
)
|
)
|
||||||
|
|
||||||
if s6
|
s6 = find_program ('s6-init', required: false)
|
||||||
|
|
||||||
|
if s6.found()
|
||||||
install_data(
|
install_data(
|
||||||
[s6_config_data_file, 'type', 'dependencies'],
|
[s6_config_data_file, 'type', 'dependencies'],
|
||||||
install_dir: join_paths(get_option('sysconfdir'), 's6', 'sv', 'tufmanager')
|
install_dir: join_paths(get_option('sysconfdir'), 's6', 'sv', 'tufmanager')
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
systemd = get_option('systemd')
|
|
||||||
|
|
||||||
systemd_config_data = configuration_data()
|
systemd_config_data = configuration_data()
|
||||||
systemd_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
systemd_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||||
|
|
||||||
@ -9,7 +7,10 @@ systemd_config_data_file = configure_file(
|
|||||||
configuration: systemd_config_data
|
configuration: systemd_config_data
|
||||||
)
|
)
|
||||||
|
|
||||||
if systemd
|
systemd = find_program ('systemd', required: false)
|
||||||
|
|
||||||
|
if systemd.found()
|
||||||
|
message ('systemd was found')
|
||||||
install_data(
|
install_data(
|
||||||
systemd_config_data_file,
|
systemd_config_data_file,
|
||||||
install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
|
install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
|
||||||
|
@ -34,27 +34,3 @@ option(
|
|||||||
value: true,
|
value: true,
|
||||||
description: 'User is always authenticated, so no password is necessary'
|
description: 'User is always authenticated, so no password is necessary'
|
||||||
)
|
)
|
||||||
option(
|
|
||||||
'openrc',
|
|
||||||
type : 'boolean',
|
|
||||||
value: false,
|
|
||||||
description: 'Install OpenRC script'
|
|
||||||
)
|
|
||||||
option(
|
|
||||||
'runit',
|
|
||||||
type : 'boolean',
|
|
||||||
value: false,
|
|
||||||
description: 'Install runit script'
|
|
||||||
)
|
|
||||||
option(
|
|
||||||
's6',
|
|
||||||
type : 'boolean',
|
|
||||||
value: false,
|
|
||||||
description: 'Install s6 scripts'
|
|
||||||
)
|
|
||||||
option(
|
|
||||||
'systemd',
|
|
||||||
type : 'boolean',
|
|
||||||
value: false,
|
|
||||||
description: 'Install systemd unit'
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user