]> git.ipfire.org Git - thirdparty/systemd.git/blob - hwdb.d/meson.build
docs: document new description field
[thirdparty/systemd.git] / hwdb.d / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 # Those files right now are not supported by the grammar. Also,
4 # they are very long but quite repetitive and the parser is not very fast.
5 # So we don't "test" them.
6 hwdb_files_notest = files('''
7 20-pci-vendor-model.hwdb
8 20-pci-classes.hwdb
9 20-usb-vendor-model.hwdb
10 20-usb-classes.hwdb
11 20-sdio-vendor-model.hwdb
12 20-sdio-classes.hwdb
13 20-bluetooth-vendor-product.hwdb
14 20-acpi-vendor.hwdb
15 20-OUI.hwdb
16 20-net-ifname.hwdb
17 20-vmbus-class.hwdb
18 '''.split())
19
20 hwdb_files_test = files('''
21 60-autosuspend.hwdb
22 60-evdev.hwdb
23 60-input-id.hwdb
24 60-keyboard.hwdb
25 60-sensor.hwdb
26 70-joystick.hwdb
27 70-mouse.hwdb
28 70-pointingstick.hwdb
29 70-touchpad.hwdb
30 '''.split())
31
32 if conf.get('ENABLE_HWDB') == 1
33 auto_suspend_rules = custom_target(
34 '60-autosuspend-chromiumos.hwdb',
35 output : '60-autosuspend-chromiumos.hwdb',
36 command : make_autosuspend_rules_py,
37 capture : true,
38 install : true,
39 install_dir: udevhwdbdir)
40
41 install_data(hwdb_files_notest,
42 hwdb_files_test,
43 install_dir : udevhwdbdir)
44
45 meson.add_install_script('sh', '-c',
46 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
47
48 meson.add_install_script('sh', '-c',
49 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
50 .format(rootbindir))
51
52 if want_tests != 'false'
53 parse_hwdb_py = find_program('parse_hwdb.py')
54 test('parse-hwdb',
55 parse_hwdb_py,
56 args : [hwdb_files_test,
57 auto_suspend_rules],
58 timeout : 90)
59 endif
60 endif
61
62 ############################################################
63
64 run_target(
65 'hwdb-update',
66 command : [hwdb_update_sh, meson.current_source_dir()])
67
68 run_target(
69 'autosuspend-update',
70 command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])