blob: ebd77b6e0773b75ffaf66fbf2e15da9c7aefd9b4 [file] [log] [blame]
Andrew Jeffery11cd2542021-05-03 11:03:30 +09301project('debug-trigger', 'c', license: 'Apache-2.0', version: '0.1')
2executable('debug-trigger', 'main.c', install: true)
3
4if get_option('systemd')
5 systemd = dependency('systemd')
6 unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
7 configure_file(input: 'systemd/system/debug-trigger@.service',
8 output: 'debug-trigger@.service',
9 copy: true,
10 install_dir: unitdir)
11endif
12
13udev = dependency('udev')
14udevdir = udev.get_pkgconfig_variable('udevdir')
Andrew Jeffery11cd2542021-05-03 11:03:30 +093015
Andrew Jeffery20017152021-06-10 11:16:58 +093016triggers = get_option('triggers')
17foreach trigger : triggers
18 src = 'udev/rules.d/debug-trigger-' + trigger + '.rules'
19 dst = 'debug-trigger-' + trigger + '.rules'
20 rulesdir = udevdir + '/rules.d'
21 configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
Andrew Jeffery11cd2542021-05-03 11:03:30 +093022endforeach