[PATCH libinput 1/2] meson: Fix absolute libdir case in install script
Quentin Glidic
sardemff7+wayland at sardemff7.net
Thu Nov 30 08:23:38 UTC 2017
From: Quentin Glidic <sardemff7+git at sardemff7.net>
If libdir is an absolute path (which means it’s outside of prefix) we
would wrongly add the prefix to it in the install script. Just pass the
correct libdir from Meson directly thanks to join_paths() magic.
Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
Just found this one while doing patch 2, I didn’t actually test it.
meson.build | 2 +-
src/libinput-restore-selinux-context.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 9b0fa246..6c5b9a84 100644
--- a/meson.build
+++ b/meson.build
@@ -225,7 +225,7 @@ pkgconfig.generate(
# Restore the SELinux context for the libinput.so.a.b.c on install
# meson bug https://github.com/mesonbuild/meson/issues/1967
meson.add_install_script('src/libinput-restore-selinux-context.sh',
- get_option('libdir'),
+ join_paths(get_option('prefix'), get_option('libdir')),
lib_libinput.full_path())
############ documentation ############
diff --git a/src/libinput-restore-selinux-context.sh b/src/libinput-restore-selinux-context.sh
index 3b1c555b..606b5b08 100644
--- a/src/libinput-restore-selinux-context.sh
+++ b/src/libinput-restore-selinux-context.sh
@@ -7,6 +7,6 @@ libdir="$1"
sofile=$(basename "$2")
if command -v restorecon >/dev/null; then
- echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
- restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+ echo "Restoring SELinux context on ${DESTDIR}${libdir}/${sofile}"
+ restorecon "${DESTDIR}${libdir}/${sofile}"
fi
--
2.15.0
More information about the wayland-devel
mailing list