openrc/sh/meson.build
William Hubbs d6622a1156 add meson build files
Closes #116.
Closes #171.
Closes #172.
Closes #175.
2021-09-04 16:01:29 -05:00

85 lines
1.8 KiB
Meson

sh_conf_data = configuration_data()
if root_prefix == '/'
sh_conf_data.set('PREFIX', '')
else
sh_conf_data.set('PREFIX', root_prefix)
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_dir = rc_libexecdir / 'sh'
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,
install_dir : sh_dir)
foreach file : sh_config
configure_file(input : file,
output : '@BASENAME@',
configuration : sh_conf_data,
install_dir : sh_dir)
endforeach
foreach file : scripts_config
configure_file(input : file,
output : '@BASENAME@',
configuration : sh_conf_data,
install_dir : sh_dir,
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,
install_dir : sh_dir,
install_mode : 'rwxr-xr-x')
endforeach