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>
This commit is contained in:
Quentin Glidic 2017-11-30 09:23:38 +01:00 committed by Peter Hutterer
parent 0843fa8e5e
commit b2b5cdaf61
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 # Restore the SELinux context for the libinput.so.a.b.c on install
# meson bug https://github.com/mesonbuild/meson/issues/1967 # meson bug https://github.com/mesonbuild/meson/issues/1967
meson.add_install_script('src/libinput-restore-selinux-context.sh', 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()) lib_libinput.full_path())
############ documentation ############ ############ documentation ############

View file

@ -7,6 +7,6 @@ libdir="$1"
sofile=$(basename "$2") sofile=$(basename "$2")
if command -v restorecon >/dev/null; then if command -v restorecon >/dev/null; then
echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile" echo "Restoring SELinux context on ${DESTDIR}${libdir}/${sofile}"
restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile" restorecon "${DESTDIR}${libdir}/${sofile}"
fi fi