1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

meson: install compat symlinks for systemctl and systemd (#8300)

v2:
- init is a symlink to systemd, not systemctl!
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-02-28 10:20:48 +01:00 committed by Lennart Poettering
parent bdad9e44e4
commit ba7f4ae617

View File

@ -60,7 +60,7 @@ conf.set10('HAVE_SPLIT_USR', split_usr)
rootprefixdir = get_option('rootprefix')
# Unusual rootprefixdir values are used by some distros
# (see https://github.com/systemd/systemd/pull/7461).
rootprefix_default = get_option('split-usr') ? '/' : '/usr'
rootprefix_default = split_usr ? '/' : '/usr'
if rootprefixdir == ''
rootprefixdir = rootprefix_default
endif
@ -87,6 +87,7 @@ datadir = join_paths(prefixdir, get_option('datadir'))
localstatedir = join_paths('/', get_option('localstatedir'))
rootbindir = join_paths(rootprefixdir, 'bin')
rootsbindir = join_paths(rootprefixdir, 'sbin')
rootlibexecdir = join_paths(rootprefixdir, 'lib/systemd')
rootlibdir = get_option('rootlibdir')
@ -1453,6 +1454,10 @@ executable('systemd',
install : true,
install_dir : rootlibexecdir)
meson.add_install_script(meson_make_symlink,
join_paths(rootlibexecdir, 'systemd'),
join_paths(rootsbindir, 'init'))
exe = executable('systemd-analyze',
systemd_analyze_sources,
include_directories : includes,
@ -1712,6 +1717,12 @@ exe = executable('systemctl', 'src/systemctl/systemctl.c',
install_dir : rootbindir)
public_programs += [exe]
foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
meson.add_install_script(meson_make_symlink,
join_paths(rootbindir, 'systemctl'),
join_paths(rootsbindir, alias))
endforeach
if conf.get('ENABLE_BACKLIGHT') == 1
executable('systemd-backlight',
'src/backlight/backlight.c',