2021-08-22 23:39:30 +05:30
|
|
|
sh_conf_data = configuration_data()
|
2021-09-07 01:00:30 +05:30
|
|
|
if rootprefix == '/'
|
2021-08-22 23:39:30 +05:30
|
|
|
sh_conf_data.set('PREFIX', '')
|
|
|
|
else
|
2021-09-07 01:00:30 +05:30
|
|
|
sh_conf_data.set('PREFIX', rootprefix)
|
2021-08-22 23:39:30 +05:30
|
|
|
endif
|
|
|
|
sh_conf_data.set('BINDIR', bindir)
|
|
|
|
sh_conf_data.set('LIBEXECDIR', rc_libexecdir)
|
|
|
|
sh_conf_data.set('LOCAL_PREFIX', local_prefix)
|
|
|
|
sh_conf_data.set('PKG_PREFIX', pkg_prefix)
|
|
|
|
sh_conf_data.set('SBINDIR', sbindir)
|
|
|
|
sh_conf_data.set('SHELL', get_option('shell'))
|
|
|
|
sh_conf_data.set('SYSCONFDIR', get_option('sysconfdir'))
|
|
|
|
|
|
|
|
sh = [
|
|
|
|
'rc-functions.sh',
|
|
|
|
'rc-mount.sh',
|
|
|
|
'runit.sh',
|
|
|
|
's6.sh',
|
|
|
|
'start-stop-daemon.sh',
|
|
|
|
'supervise-daemon.sh',
|
|
|
|
]
|
|
|
|
|
|
|
|
sh_config = [
|
|
|
|
'functions.sh.in',
|
|
|
|
]
|
|
|
|
|
|
|
|
scripts_config = [
|
|
|
|
'gendepends.sh.in',
|
|
|
|
'openrc-run.sh.in',
|
|
|
|
]
|
|
|
|
|
|
|
|
if os == 'Linux'
|
|
|
|
sh += [
|
|
|
|
'rc-cgroup.sh',
|
|
|
|
]
|
|
|
|
scripts_config += [
|
|
|
|
'binfmt.sh.in',
|
|
|
|
'cgroup-release-agent.sh.in',
|
|
|
|
]
|
|
|
|
scripts_config_os = [
|
|
|
|
['init-early.sh.Linux.in', 'init-early.sh'],
|
|
|
|
['init.sh.Linux.in', 'init.sh'],
|
|
|
|
]
|
|
|
|
elif os == 'GNU'
|
|
|
|
scripts_config_os = [
|
|
|
|
['init.sh.GNU.in', 'init.sh'],
|
|
|
|
]
|
|
|
|
elif os == 'Gnu-KFreeBSD'
|
|
|
|
scripts_config_os = [
|
|
|
|
['init.sh.GNU-kFreeBSD.in', 'init.sh'],
|
|
|
|
]
|
|
|
|
else
|
|
|
|
scripts_config_os = [
|
|
|
|
['init.sh.BSD.in', 'init.sh'],
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
install_data(sh,
|
2021-12-30 03:27:04 +05:30
|
|
|
install_dir : rc_shdir)
|
2021-08-22 23:39:30 +05:30
|
|
|
foreach file : sh_config
|
|
|
|
configure_file(input : file,
|
|
|
|
output : '@BASENAME@',
|
|
|
|
configuration : sh_conf_data,
|
2021-12-30 03:27:04 +05:30
|
|
|
install_dir : rc_shdir)
|
2021-08-22 23:39:30 +05:30
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach file : scripts_config
|
|
|
|
configure_file(input : file,
|
|
|
|
output : '@BASENAME@',
|
|
|
|
configuration : sh_conf_data,
|
2021-12-30 03:27:04 +05:30
|
|
|
install_dir : rc_shdir,
|
2021-08-22 23:39:30 +05:30
|
|
|
install_mode : 'rwxr-xr-x')
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach file : scripts_config_os
|
|
|
|
configure_file(input : file.get(0),
|
|
|
|
output : file.get(1),
|
|
|
|
configuration : sh_conf_data,
|
2021-12-30 03:27:04 +05:30
|
|
|
install_dir : rc_shdir,
|
2021-08-22 23:39:30 +05:30
|
|
|
install_mode : 'rwxr-xr-x')
|
|
|
|
endforeach
|