xref: /openbmc/dbus-sensors/service_files/meson.build (revision 275f7c39190bab69efa11218b68587e8955cc588)
1 systemd = dependency('systemd')
2 systemd_system_unit_dir = systemd.get_variable(
3     'systemdsystemunitdir',
4     pkgconfig_define: ['prefix', get_option('prefix')],
5 )
6 
7 unit_files = [
8     ['adc', 'xyz.openbmc_project.adcsensor.service'],
9     ['intel-cpu', 'xyz.openbmc_project.intelcpusensor.service'],
10     ['exit-air', 'xyz.openbmc_project.exitairsensor.service'],
11     ['fan', 'xyz.openbmc_project.fansensor.service'],
12     ['hwmon-temp', 'xyz.openbmc_project.hwmontempsensor.service'],
13     ['ipmb', 'xyz.openbmc_project.ipmbsensor.service'],
14     ['intrusion', 'xyz.openbmc_project.intrusionsensor.service'],
15     ['mctp', 'xyz.openbmc_project.mctpreactor.service'],
16     ['mcu', 'xyz.openbmc_project.mcutempsensor.service'],
17     ['nvme', 'xyz.openbmc_project.nvmesensor.service'],
18     ['psu', 'xyz.openbmc_project.psusensor.service'],
19     ['external', 'xyz.openbmc_project.externalsensor.service'],
20 ]
21 
22 fs = import('fs')
23 foreach tuple : unit_files
24     if get_option(tuple[0]).allowed()
25         fs.copyfile(
26             tuple[1],
27             install: true,
28             install_dir: systemd_system_unit_dir,
29         )
30     endif
31 endforeach
32