summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-07-13 12:57:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-07-13 13:30:54 +1000
commite6cad92005b7d32402895282752d2ec4f91124dc (patch)
tree162d483096e2608b18205858573b62d1a3715d63
parente2d62645db52cff45efed8cf9713604ccde86657 (diff)
downloadlibinput-e6cad92005b7d32402895282752d2ec4f91124dc.tar.gz
Rename data/ to quirks/
A better, less ambiguous name than just "datadir" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--doc/device-quirks.dox2
-rw-r--r--doc/trackpoints.dox4
-rw-r--r--meson.build56
-rw-r--r--quirks/10-generic-keyboard.quirks (renamed from data/10-generic-keyboard.quirks)0
-rw-r--r--quirks/10-generic-lid.quirks (renamed from data/10-generic-lid.quirks)0
-rw-r--r--quirks/10-generic-trackball.quirks (renamed from data/10-generic-trackball.quirks)0
-rw-r--r--quirks/30-vendor-aiptek.quirks (renamed from data/30-vendor-aiptek.quirks)0
-rw-r--r--quirks/30-vendor-alps.quirks (renamed from data/30-vendor-alps.quirks)0
-rw-r--r--quirks/30-vendor-cyapa.quirks (renamed from data/30-vendor-cyapa.quirks)0
-rw-r--r--quirks/30-vendor-elantech.quirks (renamed from data/30-vendor-elantech.quirks)0
-rw-r--r--quirks/30-vendor-huion.quirks (renamed from data/30-vendor-huion.quirks)0
-rw-r--r--quirks/30-vendor-ibm.quirks (renamed from data/30-vendor-ibm.quirks)0
-rw-r--r--quirks/30-vendor-logitech.quirks (renamed from data/30-vendor-logitech.quirks)0
-rw-r--r--quirks/30-vendor-microsoft.quirks (renamed from data/30-vendor-microsoft.quirks)0
-rw-r--r--quirks/30-vendor-razer.quirks (renamed from data/30-vendor-razer.quirks)0
-rw-r--r--quirks/30-vendor-synaptics.quirks (renamed from data/30-vendor-synaptics.quirks)0
-rw-r--r--quirks/30-vendor-wacom.quirks (renamed from data/30-vendor-wacom.quirks)0
-rw-r--r--quirks/50-system-apple.quirks (renamed from data/50-system-apple.quirks)0
-rw-r--r--quirks/50-system-asus.quirks (renamed from data/50-system-asus.quirks)0
-rw-r--r--quirks/50-system-chicony.quirks (renamed from data/50-system-chicony.quirks)0
-rw-r--r--quirks/50-system-cyborg.quirks (renamed from data/50-system-cyborg.quirks)0
-rw-r--r--quirks/50-system-dell.quirks (renamed from data/50-system-dell.quirks)0
-rw-r--r--quirks/50-system-google.quirks (renamed from data/50-system-google.quirks)0
-rw-r--r--quirks/50-system-hp.quirks (renamed from data/50-system-hp.quirks)0
-rw-r--r--quirks/50-system-lenovo.quirks (renamed from data/50-system-lenovo.quirks)0
-rw-r--r--quirks/50-system-system76.quirks (renamed from data/50-system-system76.quirks)0
-rw-r--r--quirks/README.md (renamed from data/README.md)0
-rw-r--r--src/libinput.c6
-rw-r--r--test/litest.c16
-rw-r--r--tools/libinput-quirks.c10
-rw-r--r--tools/libinput-record.c4
31 files changed, 50 insertions, 48 deletions
diff --git a/doc/device-quirks.dox b/doc/device-quirks.dox
index d4368664..8bb5ec2b 100644
--- a/doc/device-quirks.dox
+++ b/doc/device-quirks.dox
@@ -9,7 +9,7 @@ installed under `/usr/share/libinput/<filename>.quirks` and are standard
`.ini` files. A file may contain multiple section headers (`[some
identifier]`) followed by one or more `MatchFoo=Bar` directives, followed by
at least one of `ModelFoo=1` or `AttrFoo=bar` directive. See the
-`data/README.md` file in the libinput source repository for more details on
+`quirks/README.md` file in the libinput source repository for more details on
their contents.
@note Model quirks are internal API and may change at any time. No
diff --git a/doc/trackpoints.dox b/doc/trackpoints.dox
index 8bd6c680..5223257a 100644
--- a/doc/trackpoints.dox
+++ b/doc/trackpoints.dox
@@ -99,7 +99,7 @@ installed.
$ cd path/to/libinput.git
# Use an approximate multiplier in the quirks file
-$ cat > data/99-trackpont-override.quirks <<EOF
+$ cat > quirks/99-trackpont-override.quirks <<EOF
[Trackpoint Override]
MatchUdevType=pointingstick
AttrTrackpointMultiplier=1.0
@@ -125,7 +125,7 @@ Once the trackpoint behaves correctly you are ready to test the system
libinput:
@verbatim
-$ sudo cp data/99-trackpoint-override.quirks /etc/libinput/local-overrides.quirks
+$ sudo cp quirks/99-trackpoint-override.quirks /etc/libinput/local-overrides.quirks
@endverbatim
Now verify the override is seen by the system libinput
diff --git a/meson.build b/meson.build
index 072a1e90..94973255 100644
--- a/meson.build
+++ b/meson.build
@@ -12,7 +12,7 @@ dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'li
dir_lib = join_paths(get_option('prefix'), get_option('libdir'))
dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1')
dir_system_udev = join_paths(get_option('prefix'), 'lib', 'udev')
-dir_src_quirks = join_paths(meson.source_root(), 'data')
+dir_src_quirks = join_paths(meson.source_root(), 'quirks')
dir_src_test = join_paths(meson.source_root(), 'test')
dir_src = join_paths(meson.source_root(), 'src')
@@ -185,37 +185,37 @@ 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')
-config_h.set_quoted('LIBINPUT_DATA_DIR', dir_data)
-config_h.set_quoted('LIBINPUT_DATA_OVERRIDE_FILE', libinput_data_override_path)
+config_h.set_quoted('LIBINPUT_QUIRKS_DIR', dir_data)
+config_h.set_quoted('LIBINPUT_QUIRKS_OVERRIDE_FILE', libinput_data_override_path)
quirks_data = [
- 'data/10-generic-keyboard.quirks',
- 'data/10-generic-lid.quirks',
- 'data/10-generic-trackball.quirks',
- 'data/30-vendor-aiptek.quirks',
- 'data/30-vendor-alps.quirks',
- 'data/30-vendor-cyapa.quirks',
- 'data/30-vendor-elantech.quirks',
- 'data/30-vendor-huion.quirks',
- 'data/30-vendor-ibm.quirks',
- 'data/30-vendor-logitech.quirks',
- 'data/30-vendor-microsoft.quirks',
- 'data/30-vendor-razer.quirks',
- 'data/30-vendor-synaptics.quirks',
- 'data/30-vendor-wacom.quirks',
- 'data/50-system-apple.quirks',
- 'data/50-system-asus.quirks',
- 'data/50-system-chicony.quirks',
- 'data/50-system-cyborg.quirks',
- 'data/50-system-dell.quirks',
- 'data/50-system-google.quirks',
- 'data/50-system-hp.quirks',
- 'data/50-system-lenovo.quirks',
- 'data/50-system-system76.quirks',
+ 'quirks/10-generic-keyboard.quirks',
+ 'quirks/10-generic-lid.quirks',
+ 'quirks/10-generic-trackball.quirks',
+ 'quirks/30-vendor-aiptek.quirks',
+ 'quirks/30-vendor-alps.quirks',
+ 'quirks/30-vendor-cyapa.quirks',
+ 'quirks/30-vendor-elantech.quirks',
+ 'quirks/30-vendor-huion.quirks',
+ 'quirks/30-vendor-ibm.quirks',
+ 'quirks/30-vendor-logitech.quirks',
+ 'quirks/30-vendor-microsoft.quirks',
+ 'quirks/30-vendor-razer.quirks',
+ 'quirks/30-vendor-synaptics.quirks',
+ 'quirks/30-vendor-wacom.quirks',
+ 'quirks/50-system-apple.quirks',
+ 'quirks/50-system-asus.quirks',
+ 'quirks/50-system-chicony.quirks',
+ 'quirks/50-system-cyborg.quirks',
+ 'quirks/50-system-dell.quirks',
+ 'quirks/50-system-google.quirks',
+ 'quirks/50-system-hp.quirks',
+ 'quirks/50-system-lenovo.quirks',
+ 'quirks/50-system-system76.quirks',
]
-config_h.set_quoted('LIBINPUT_DATA_FILES', ':'.join(quirks_data))
-config_h.set_quoted('LIBINPUT_DATA_SRCDIR', dir_src_quirks)
+config_h.set_quoted('LIBINPUT_QUIRKS_FILES', ':'.join(quirks_data))
+config_h.set_quoted('LIBINPUT_QUIRKS_SRCDIR', dir_src_quirks)
install_data(quirks_data, install_dir : dir_data)
diff --git a/data/10-generic-keyboard.quirks b/quirks/10-generic-keyboard.quirks
index 103d05a6..103d05a6 100644
--- a/data/10-generic-keyboard.quirks
+++ b/quirks/10-generic-keyboard.quirks
diff --git a/data/10-generic-lid.quirks b/quirks/10-generic-lid.quirks
index 1c20acd2..1c20acd2 100644
--- a/data/10-generic-lid.quirks
+++ b/quirks/10-generic-lid.quirks
diff --git a/data/10-generic-trackball.quirks b/quirks/10-generic-trackball.quirks
index eba32afd..eba32afd 100644
--- a/data/10-generic-trackball.quirks
+++ b/quirks/10-generic-trackball.quirks
diff --git a/data/30-vendor-aiptek.quirks b/quirks/30-vendor-aiptek.quirks
index e5319d5a..e5319d5a 100644
--- a/data/30-vendor-aiptek.quirks
+++ b/quirks/30-vendor-aiptek.quirks
diff --git a/data/30-vendor-alps.quirks b/quirks/30-vendor-alps.quirks
index e4e5d47e..e4e5d47e 100644
--- a/data/30-vendor-alps.quirks
+++ b/quirks/30-vendor-alps.quirks
diff --git a/data/30-vendor-cyapa.quirks b/quirks/30-vendor-cyapa.quirks
index 9d89a0ec..9d89a0ec 100644
--- a/data/30-vendor-cyapa.quirks
+++ b/quirks/30-vendor-cyapa.quirks
diff --git a/data/30-vendor-elantech.quirks b/quirks/30-vendor-elantech.quirks
index e49c3415..e49c3415 100644
--- a/data/30-vendor-elantech.quirks
+++ b/quirks/30-vendor-elantech.quirks
diff --git a/data/30-vendor-huion.quirks b/quirks/30-vendor-huion.quirks
index 0e46d208..0e46d208 100644
--- a/data/30-vendor-huion.quirks
+++ b/quirks/30-vendor-huion.quirks
diff --git a/data/30-vendor-ibm.quirks b/quirks/30-vendor-ibm.quirks
index 988d2a90..988d2a90 100644
--- a/data/30-vendor-ibm.quirks
+++ b/quirks/30-vendor-ibm.quirks
diff --git a/data/30-vendor-logitech.quirks b/quirks/30-vendor-logitech.quirks
index 12b48e4b..12b48e4b 100644
--- a/data/30-vendor-logitech.quirks
+++ b/quirks/30-vendor-logitech.quirks
diff --git a/data/30-vendor-microsoft.quirks b/quirks/30-vendor-microsoft.quirks
index 286b902e..286b902e 100644
--- a/data/30-vendor-microsoft.quirks
+++ b/quirks/30-vendor-microsoft.quirks
diff --git a/data/30-vendor-razer.quirks b/quirks/30-vendor-razer.quirks
index b3cd8170..b3cd8170 100644
--- a/data/30-vendor-razer.quirks
+++ b/quirks/30-vendor-razer.quirks
diff --git a/data/30-vendor-synaptics.quirks b/quirks/30-vendor-synaptics.quirks
index 3cdeb45d..3cdeb45d 100644
--- a/data/30-vendor-synaptics.quirks
+++ b/quirks/30-vendor-synaptics.quirks
diff --git a/data/30-vendor-wacom.quirks b/quirks/30-vendor-wacom.quirks
index 2613d0d2..2613d0d2 100644
--- a/data/30-vendor-wacom.quirks
+++ b/quirks/30-vendor-wacom.quirks
diff --git a/data/50-system-apple.quirks b/quirks/50-system-apple.quirks
index fbbb1be0..fbbb1be0 100644
--- a/data/50-system-apple.quirks
+++ b/quirks/50-system-apple.quirks
diff --git a/data/50-system-asus.quirks b/quirks/50-system-asus.quirks
index 8d7fca54..8d7fca54 100644
--- a/data/50-system-asus.quirks
+++ b/quirks/50-system-asus.quirks
diff --git a/data/50-system-chicony.quirks b/quirks/50-system-chicony.quirks
index 8f71e92f..8f71e92f 100644
--- a/data/50-system-chicony.quirks
+++ b/quirks/50-system-chicony.quirks
diff --git a/data/50-system-cyborg.quirks b/quirks/50-system-cyborg.quirks
index d999dc82..d999dc82 100644
--- a/data/50-system-cyborg.quirks
+++ b/quirks/50-system-cyborg.quirks
diff --git a/data/50-system-dell.quirks b/quirks/50-system-dell.quirks
index 7e873edf..7e873edf 100644
--- a/data/50-system-dell.quirks
+++ b/quirks/50-system-dell.quirks
diff --git a/data/50-system-google.quirks b/quirks/50-system-google.quirks
index cd312973..cd312973 100644
--- a/data/50-system-google.quirks
+++ b/quirks/50-system-google.quirks
diff --git a/data/50-system-hp.quirks b/quirks/50-system-hp.quirks
index 1f7efddf..1f7efddf 100644
--- a/data/50-system-hp.quirks
+++ b/quirks/50-system-hp.quirks
diff --git a/data/50-system-lenovo.quirks b/quirks/50-system-lenovo.quirks
index 0969869a..0969869a 100644
--- a/data/50-system-lenovo.quirks
+++ b/quirks/50-system-lenovo.quirks
diff --git a/data/50-system-system76.quirks b/quirks/50-system-system76.quirks
index 2e8eb800..2e8eb800 100644
--- a/data/50-system-system76.quirks
+++ b/quirks/50-system-system76.quirks
diff --git a/data/README.md b/quirks/README.md
index 55b9056f..55b9056f 100644
--- a/data/README.md
+++ b/quirks/README.md
diff --git a/src/libinput.c b/src/libinput.c
index 846c5bf7..fc3dd24d 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1734,10 +1734,10 @@ libinput_init_quirks(struct libinput *libinput)
/* If we fail, we'll fail next time too */
libinput->quirks_initialized = true;
- data_path = getenv("LIBINPUT_DATA_DIR");
+ data_path = getenv("LIBINPUT_QUIRKS_DIR");
if (!data_path) {
- data_path = LIBINPUT_DATA_DIR;
- override_file = LIBINPUT_DATA_OVERRIDE_FILE;
+ data_path = LIBINPUT_QUIRKS_DIR;
+ override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
}
quirks = quirks_init_subsystem(data_path,
diff --git a/test/litest.c b/test/litest.c
index dab62c4a..ac836e03 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -866,7 +866,7 @@ litest_run_suite(struct list *tests, int which, int max, int error_fd)
struct name *n, *tmp;
struct list testnames;
- quirks_context = quirks_init_subsystem(getenv("LIBINPUT_DATA_DIR"),
+ quirks_context = quirks_init_subsystem(getenv("LIBINPUT_QUIRKS_DIR"),
NULL,
quirk_log_handler,
NULL,
@@ -1095,12 +1095,12 @@ litest_run(int argc, char **argv)
verbose = 1;
#if DISABLE_DEVICE_TESTS
- quirks_dir = safe_strdup(LIBINPUT_DATA_SRCDIR);
+ quirks_dir = safe_strdup(LIBINPUT_QUIRKS_SRCDIR);
#else
litest_init_udev_rules(&created_files_list);
quirks_dir = litest_install_quirks(&created_files_list);
#endif
- setenv("LIBINPUT_DATA_DIR", quirks_dir, 1);
+ setenv("LIBINPUT_QUIRKS_DIR", quirks_dir, 1);
free(quirks_dir);
litest_setup_sighandler(SIGINT);
@@ -1296,19 +1296,21 @@ litest_install_quirks(struct list *created_files_list)
litest_assert_notnull(mkdtemp(dirname));
litest_assert_int_ne(chmod(dirname, 0755), -1);
- quirks = strv_from_string(LIBINPUT_DATA_FILES, ":");
+ quirks = strv_from_string(LIBINPUT_QUIRKS_FILES, ":");
litest_assert(quirks);
q = quirks;
while (*q) {
+ const char *quirksdir = "quirks/";
char *filename;
char dest[PATH_MAX];
char src[PATH_MAX];
- litest_assert(strneq(*q, "data/", 5));
- filename = &(*q)[5];
+ litest_assert(strneq(*q, quirksdir, strlen(quirksdir)));
+ filename = &(*q)[strlen(quirksdir)];
- snprintf(src, sizeof(src), "%s/%s", LIBINPUT_DATA_SRCDIR, filename);
+ snprintf(src, sizeof(src), "%s/%s",
+ LIBINPUT_QUIRKS_SRCDIR, filename);
snprintf(dest, sizeof(dest), "%s/%s", dirname, filename);
file = litest_copy_file(dest, src, NULL);
list_append(created_files_list, &file->link);
diff --git a/tools/libinput-quirks.c b/tools/libinput-quirks.c
index 862bb0ae..b9c38142 100644
--- a/tools/libinput-quirks.c
+++ b/tools/libinput-quirks.c
@@ -74,10 +74,10 @@ static void
usage(void)
{
printf("Usage:\n"
- " libinput quirks list [--data-dir /path/to/data/dir] /dev/input/event0\n"
+ " libinput quirks list [--data-dir /path/to/quirks/dir] /dev/input/event0\n"
" Print the quirks for the given device\n"
"\n"
- " libinput quirks validate [--data-dir /path/to/data/dir]\n"
+ " libinput quirks validate [--data-dir /path/to/quirks/dir]\n"
" Validate the database\n");
}
@@ -166,11 +166,11 @@ main(int argc, char **argv)
builddir = tools_execdir_is_builddir();
if (builddir) {
- data_path = LIBINPUT_DATA_SRCDIR;
+ data_path = LIBINPUT_QUIRKS_SRCDIR;
free(builddir);
} else {
- data_path = LIBINPUT_DATA_DIR;
- override_file = LIBINPUT_DATA_OVERRIDE_FILE;
+ data_path = LIBINPUT_QUIRKS_DIR;
+ override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
}
}
diff --git a/tools/libinput-record.c b/tools/libinput-record.c
index 1a6838e1..50b6ee85 100644
--- a/tools/libinput-record.c
+++ b/tools/libinput-record.c
@@ -1688,8 +1688,8 @@ print_device_quirks(struct record_context *ctx, struct record_device *dev)
struct udev_device *udev_device = NULL;
struct stat st;
struct quirks_context *quirks;
- const char *data_path = LIBINPUT_DATA_DIR;
- const char *override_file = LIBINPUT_DATA_OVERRIDE_FILE;
+ const char *data_path = LIBINPUT_QUIRKS_DIR;
+ const char *override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
if (stat(dev->devnode, &st) < 0)
return;