summaryrefslogtreecommitdiffstats
path: root/hwdb/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:50 +0000
commit19f4f86bfed21c5326ed2acebe1163f3a83e832b (patch)
treed59b9989ce55ed23693e80974d94c856f1c2c8b1 /hwdb/meson.build
parentInitial commit. (diff)
downloadsystemd-19f4f86bfed21c5326ed2acebe1163f3a83e832b.tar.xz
systemd-19f4f86bfed21c5326ed2acebe1163f3a83e832b.zip
Adding upstream version 241.upstream/241upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'hwdb/meson.build')
-rw-r--r--hwdb/meson.build49
1 files changed, 49 insertions, 0 deletions
diff --git a/hwdb/meson.build b/hwdb/meson.build
new file mode 100644
index 0000000..31ee3e7
--- /dev/null
+++ b/hwdb/meson.build
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: LGPL-2.1+
+
+hwdb_files = files('''
+ 20-pci-vendor-model.hwdb
+ 20-pci-classes.hwdb
+ 20-usb-vendor-model.hwdb
+ 20-usb-classes.hwdb
+ 20-sdio-vendor-model.hwdb
+ 20-sdio-classes.hwdb
+ 20-bluetooth-vendor-product.hwdb
+ 20-acpi-vendor.hwdb
+ 20-OUI.hwdb
+ 20-net-ifname.hwdb
+ 20-vmbus-class.hwdb
+ 60-evdev.hwdb
+ 60-keyboard.hwdb
+ 60-sensor.hwdb
+ 70-joystick.hwdb
+ 70-mouse.hwdb
+ 70-pointingstick.hwdb
+ 70-touchpad.hwdb
+'''.split())
+
+if conf.get('ENABLE_HWDB') == 1
+ install_data(hwdb_files,
+ install_dir : udevhwdbdir)
+
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
+
+ meson.add_install_script('sh', '-c',
+ 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
+ .format(rootbindir))
+endif
+
+############################################################
+
+parse_hwdb_py = find_program('parse_hwdb.py')
+if want_tests != 'false'
+ test('parse-hwdb',
+ parse_hwdb_py,
+ timeout : 90)
+endif
+
+############################################################
+
+run_target(
+ 'hwdb-update',
+ command : [hwdb_update_sh, meson.current_source_dir()])