diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2021-09-10 10:15:25 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2021-09-13 11:05:44 +0200 |
commit | 79f01fdd90c68bdfe248cc3763ee50cf15c49e4e (patch) | |
tree | d8ea199911839ed5c4b4562ec2b726efc7beef7b | |
parent | 6a9c6bd9f5bf155c045b33b39f751a2713b9f1b1 (diff) |
build: Use the install_mode option
Since meson 0.47, `install_mode` option can be used to set a given
set of rights to any target.
This feature has been used to set `qmi-network` rights instead of
using a post install script.
[0] https://mesonbuild.com/Release-notes-for-0-47-0.html#install_mode-keyword-argument-extended-to-all-installable-targets
-rw-r--r-- | meson.build | 5 | ||||
-rwxr-xr-x | meson_post_install.py | 13 | ||||
-rw-r--r-- | utils/meson.build | 1 |
3 files changed, 1 insertions, 18 deletions
diff --git a/meson.build b/meson.build index a804055..3bb0259 100644 --- a/meson.build +++ b/meson.build @@ -236,11 +236,6 @@ configure_file( configuration: config_h, ) -meson.add_install_script( - 'meson_post_install.py', - get_option('bindir'), -) - summary({ 'compiler': cc.get_id(), 'cflags': cc_flags, diff --git a/meson_post_install.py b/meson_post_install.py deleted file mode 100755 index bf77991..0000000 --- a/meson_post_install.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python3 - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2019 - 2021 Iñigo Martinez <inigomartinez@gmail.com> - -import os -import subprocess -import sys - -prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX'] - -bindir = os.path.join(prefix, sys.argv[1]) -subprocess.check_call(['chmod', '755', os.path.join(bindir, 'qmi-network')]) diff --git a/utils/meson.build b/utils/meson.build index 3fb6e4a..727aa68 100644 --- a/utils/meson.build +++ b/utils/meson.build @@ -18,4 +18,5 @@ qmi_network = configure_file( output: '@BASENAME@', configuration: version_conf, install_dir: qmi_bindir, + install_mode: 'rwxr-xr-x', ) |