summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-02-03 10:19:20 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-02-08 04:28:42 +0000
commitd1f900f764012cc4991aa3ef68ef743b5b069fb2 (patch)
tree2b69aa0fbd5dd436a4485ec2bd4e7b67f076b098
parent61e41df901b7b30155188411c030c35dfa8f7c79 (diff)
downloadlibinput-d1f900f764012cc4991aa3ef68ef743b5b069fb2.tar.gz
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 <peter.hutterer@who-t.net>
-rw-r--r--.gitlab-ci/libinput.spec.in1
-rw-r--r--meson.build8
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci/libinput.spec.in b/.gitlab-ci/libinput.spec.in
index ef91c40c..670afd1a 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 f2a064a8..ad87594b 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 + [