From f2960ab2bf340f1e9a6bc74a88b18b87abcb8434 Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Thu, 30 Nov 2017 09:06:04 +0100 Upstream: no, submitted https://lists.freedesktop.org/archives/wayland-devel/2017-November/036009.html Subject: [PATCH libinput] meson: Fix bindir usage in install script Since the install script cannot know the correct bindir, just pass it from Meson directly. Signed-off-by: Quentin Glidic --- meson.build | 3 ++- tools/install-compat-scripts.sh | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 6c5b9a84..734bf1a5 100644 --- a/meson.build +++ b/meson.build @@ -473,7 +473,8 @@ configure_file(input : 'tools/libinput.man', install_dir : join_paths(get_option('mandir'), 'man1') ) -meson.add_install_script('tools/install-compat-scripts.sh') +meson.add_install_script('tools/install-compat-scripts.sh', + join_paths(get_option('prefix'), get_option('bindir'))) ptraccel_debug_sources = [ 'tools/ptraccel-debug.c' ] executable('ptraccel-debug', diff --git a/tools/install-compat-scripts.sh b/tools/install-compat-scripts.sh index 0d8b3adb..b046b849 100755 --- a/tools/install-compat-scripts.sh +++ b/tools/install-compat-scripts.sh @@ -1,9 +1,7 @@ #!/bin/sh -# -# This does not honor $bindir properly, because we cannot get to it -# here. Does anyone build to something but prefix/bin? -# -bindir="${DESTDIR}/${MESON_INSTALL_PREFIX}/bin" -mkdir -p "$bindir" + +bindir="${DESTDIR}${1}" + +# Do not create bindir, because if it is not there now, we have a problem cp "${MESON_SOURCE_ROOT}/tools/libinput-list-devices.compat" "${bindir}/libinput-list-devices" cp "${MESON_SOURCE_ROOT}/tools/libinput-debug-events.compat" "${bindir}/libinput-debug-events" -- 2.15.0