diff --git a/meson.build b/meson.build index 9295fa23..5a0228ee 100644 --- a/meson.build +++ b/meson.build @@ -496,7 +496,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"