diff options
author | Simon McVittie <smcv@collabora.com> | 2022-06-27 15:37:17 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-07-13 20:36:13 +0100 |
commit | 398820d1fe45f85ac0a22971b88ce8a9903e4d70 (patch) | |
tree | df09528018bc8bba9373d4beaeeb0687e934121a /meson_post_install.py | |
parent | e2f2c5dd42e193d4bddb0bda49b07bf254cff248 (diff) | |
download | dbus-398820d1fe45f85ac0a22971b88ce8a9903e4d70.tar.gz |
build: Change how we create empty directories from Meson
Use install_emptydir() 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_emptydir() when we drop support
for Meson versions older than 0.60.0.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'meson_post_install.py')
-rwxr-xr-x | meson_post_install.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/meson_post_install.py b/meson_post_install.py index 22f0539a..3b083130 100755 --- a/meson_post_install.py +++ b/meson_post_install.py @@ -57,23 +57,8 @@ def to_destdir(path): # Define paths here abs_libdir = destdir_prefix / get_option('libdir') -dbus_data_dir = destdir_prefix / get_option('datadir') / 'dbus-1' -platform_unix = sys.argv[1].lower() == 'true' -relocation = sys.argv[2].lower() == 'true' - -def post_install_data(): - (dbus_data_dir / 'session.d').mkdir(parents=True, exist_ok=True) - (dbus_data_dir / 'services').mkdir(parents=True, exist_ok=True) - (dbus_data_dir / 'session.d').mkdir(parents=True, exist_ok=True) - - localstatedir = Path(get_option('localstatedir')) - if destdir: - localstatedir = destdir / localstatedir.relative_to(localstatedir.anchor) - if platform_unix: - (localstatedir / 'run' / 'dbus').mkdir(parents=True, exist_ok=True) - (dbus_data_dir / 'system.d').mkdir(parents=True, exist_ok=True) - (dbus_data_dir / 'system-services').mkdir(parents=True, exist_ok=True) +relocation = sys.argv[1].lower() == 'true' def post_install_relocation(): # Edit pkg-config file to replace the prefix @@ -116,6 +101,5 @@ def post_install_exe(): if __name__ == "__main__": - post_install_data() post_install_relocation() post_install_exe() |