| 1 |
ir_keytable_sources = files( |
| 2 |
'ir-encode.c', |
| 3 |
'ir-encode.h', |
| 4 |
'keymap.c', |
| 5 |
'keymap.h', |
| 6 |
'keytable.c', |
| 7 |
'parse.h', |
| 8 |
'toml.c', |
| 9 |
'toml.h', |
| 10 |
) |
| 11 |
|
| 12 |
ir_keytable_deps = [ |
| 13 |
dep_argp, |
| 14 |
dep_intl, |
| 15 |
] |
| 16 |
|
| 17 |
ir_keytable_system_dir = udevdir |
| 18 |
ir_keytable_user_dir = get_option('sysconfdir') / 'rc_keymaps' |
| 19 |
|
| 20 |
ir_keytable_c_args = [ |
| 21 |
'-DIR_KEYTABLE_SYSTEM_DIR="@0@"'.format(ir_keytable_system_dir / 'rc_keymaps'), |
| 22 |
'-DIR_KEYTABLE_USER_DIR="@0@"'.format(ir_keytable_user_dir), |
| 23 |
] |
| 24 |
|
| 25 |
ir_bpf_enabled = prog_bpf.found() and dep_libbpf.found() and dep_libelf.found() |
| 26 |
|
| 27 |
if ir_bpf_enabled |
| 28 |
ir_keytable_sources += files( |
| 29 |
'bpf_load.c', |
| 30 |
'bpf_load.h', |
| 31 |
) |
| 32 |
ir_keytable_deps += [ |
| 33 |
dep_libbpf, |
| 34 |
dep_libelf, |
| 35 |
] |
| 36 |
ir_keytable_c_args += [ |
| 37 |
'-DHAVE_BPF', |
| 38 |
] |
| 39 |
subdir('bpf_protocols') |
| 40 |
endif |
| 41 |
|
| 42 |
ir_keytable_incdir = [ |
| 43 |
utils_common_incdir, |
| 44 |
v4l2_utils_incdir, |
| 45 |
] |
| 46 |
|
| 47 |
ir_keytable = executable('ir-keytable', |
| 48 |
sources : ir_keytable_sources, |
| 49 |
install : true, |
| 50 |
dependencies : ir_keytable_deps, |
| 51 |
c_args : ir_keytable_c_args, |
| 52 |
include_directories : ir_keytable_incdir) |
| 53 |
|
| 54 |
man_pages += [[ meson.current_source_dir(), 'ir-keytable', 1 ]] |
| 55 |
man_pages += [[ meson.current_source_dir(), 'rc_keymap', 5 ]] |
| 56 |
|
| 57 |
ir_keytable_sysconf_files = files( |
| 58 |
'rc_maps.cfg', |
| 59 |
) |
| 60 |
install_data(ir_keytable_sysconf_files, |
| 61 |
install_dir : get_option('sysconfdir')) |
| 62 |
|
| 63 |
subdir('rc_keymaps') |
| 64 |
install_data(ir_keytable_rc_keymaps, |
| 65 |
install_dir : ir_keytable_system_dir / 'rc_keymaps') |
| 66 |
|
| 67 |
ir_keytable_udev_rules = files( |
| 68 |
'70-infrared.rules', |
| 69 |
) |
| 70 |
install_data(ir_keytable_udev_rules, |
| 71 |
install_dir : ir_keytable_system_dir / 'rules.d') |
| 72 |
|
| 73 |
if ir_bpf_enabled |
| 74 |
if dep_systemd.found() |
| 75 |
if have_udevdsyscallfilter |
| 76 |
ir_keytable_systemd_files = files( |
| 77 |
'50-rc_keymap.conf', |
| 78 |
) |
| 79 |
install_data(ir_keytable_systemd_files, |
| 80 |
install_dir : systemd_systemdir / 'systemd-udevd.service.d') |
| 81 |
endif |
| 82 |
endif |
| 83 |
endif |
| 84 |
|
| 85 |
install_emptydir(ir_keytable_user_dir / 'protocols') |