From b2b5cdaf61a79fb42aecf86af24b21a5372eed4b Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Thu, 30 Nov 2017 09:23:38 +0100 Subject: [PATCH] meson: Fix absolute libdir case in install script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Peter Hutterer --- 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 5a0228ee..ec13d93a 100644 --- a/meson.build +++ b/meson.build @@ -234,7 +234,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