meson: Fix absolute libdir case in install script

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@sardemff7.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b2b5cdaf61)
This commit is contained in:
Quentin Glidic 2017-11-30 09:23:38 +01:00 committed by Peter Hutterer
parent c726f37ebd
commit 0fcbb58d97
2 changed files with 3 additions and 3 deletions

View file

@ -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 ############

View file

@ -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