diff options
author | Simon McVittie <smcv@collabora.com> | 2022-06-27 15:12:54 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-07-13 20:36:13 +0100 |
commit | e2f2c5dd42e193d4bddb0bda49b07bf254cff248 (patch) | |
tree | 57901dda3003f9496e9e9c7dfd98fba19dca89d9 /bus | |
parent | abef7950816d423b3b65fcf36bfa0cf0e36c4ebf (diff) | |
download | dbus-e2f2c5dd42e193d4bddb0bda49b07bf254cff248.tar.gz |
build: Change how we create symlinks from Meson
Use install_symlink() in Meson versions that support it, or a script
with similar invocation in versions that do not. This will make it
straightforward to migrate to install_symlink() when we drop support
for Meson versions older than 0.61.0.
Based on an implementation in the game-data-packager package, which used
a shell script.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'bus')
-rw-r--r-- | bus/meson.build | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bus/meson.build b/bus/meson.build index 7d09e738..06e293b8 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -183,3 +183,28 @@ if platform_unix and use_traditional_activation install_dir: get_option('libexecdir'), ) endif + +if use_systemd + install_symlinks += [ + { + 'link_name': 'dbus.service', + 'install_dir': systemd_system_unitdir / 'multi-user.target.wants', + 'pointing_to': '../dbus.service', + }, + { + 'link_name': 'dbus.socket', + 'install_dir': systemd_system_unitdir / 'sockets.target.wants', + 'pointing_to': '../dbus.socket', + }, + ] +endif + +if use_systemd and get_option('user_session') + install_symlinks += [ + { + 'link_name': 'dbus.socket', + 'install_dir': systemd_user_unitdir / 'sockets.target.wants', + 'pointing_to': '../dbus.socket', + }, + ] +endif |