From d1f900f764012cc4991aa3ef68ef743b5b069fb2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Feb 2021 10:19:20 +1000 Subject: [PATCH] Create /etc/libinput on install Users that need to create the local-overrides.quirks are sometimes hesitant to do so because /etc/libinput doesn't exist by default. Let's create it on install. Related #568 Signed-off-by: Peter Hutterer --- .gitlab-ci/libinput.spec.in | 1 + meson.build | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/libinput.spec.in b/.gitlab-ci/libinput.spec.in index ef91c40..670afd1 100644 --- a/.gitlab-ci/libinput.spec.in +++ b/.gitlab-ci/libinput.spec.in @@ -73,6 +73,7 @@ intended to be run by users. %files %doc COPYING +%dir %{_sysconfdir}/libinput %{_libdir}/libinput.so.* %{udevdir}/libinput-device-group %{udevdir}/libinput-fuzz-extract diff --git a/meson.build b/meson.build index f2a064a..ad87594 100644 --- a/meson.build +++ b/meson.build @@ -7,7 +7,8 @@ project('libinput', 'c', libinput_version = meson.project_version().split('.') dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libinput') -dir_sysconf = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libinput') +dir_etc = join_paths(get_option('prefix'), get_option('sysconfdir')) +dir_overrides = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libinput') dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'libinput') dir_lib = join_paths(get_option('prefix'), get_option('libdir')) dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1') @@ -312,7 +313,7 @@ dep_libfilter = declare_dependency(link_with : libfilter) ############ libquirks.a ############# libinput_data_path = dir_data -libinput_data_override_path = join_paths(dir_sysconf, 'local-overrides.quirks') +libinput_data_override_path = join_paths(dir_overrides, 'local-overrides.quirks') config_h.set_quoted('LIBINPUT_QUIRKS_DIR', dir_data) config_h.set_quoted('LIBINPUT_QUIRKS_OVERRIDE_FILE', libinput_data_override_path) @@ -334,6 +335,9 @@ libquirks = static_library('quirks', src_libquirks, include_directories : includes_include) dep_libquirks = declare_dependency(link_with : libquirks) +# Create /etc/libinput +install_subdir('libinput', install_dir : dir_etc) + ############ libinput.so ############ install_headers('src/libinput.h') src_libinput = src_libfilter + [ -- 2.7.4