xref: /openbmc/dbus-sensors/service_files/meson.build (revision 275f7c39190bab69efa11218b68587e8955cc588)
18a9ff14aSAndrew Jefferysystemd = dependency('systemd')
28a9ff14aSAndrew Jefferysystemd_system_unit_dir = systemd.get_variable(
38a9ff14aSAndrew Jeffery    'systemdsystemunitdir',
48a9ff14aSAndrew Jeffery    pkgconfig_define: ['prefix', get_option('prefix')],
58a9ff14aSAndrew Jeffery)
68a9ff14aSAndrew Jeffery
7feb19ef0SBrad Bishopunit_files = [
8feb19ef0SBrad Bishop    ['adc', 'xyz.openbmc_project.adcsensor.service'],
9255da6b4SThu Nguyen    ['intel-cpu', 'xyz.openbmc_project.intelcpusensor.service'],
10feb19ef0SBrad Bishop    ['exit-air', 'xyz.openbmc_project.exitairsensor.service'],
11feb19ef0SBrad Bishop    ['fan', 'xyz.openbmc_project.fansensor.service'],
12feb19ef0SBrad Bishop    ['hwmon-temp', 'xyz.openbmc_project.hwmontempsensor.service'],
13feb19ef0SBrad Bishop    ['ipmb', 'xyz.openbmc_project.ipmbsensor.service'],
14feb19ef0SBrad Bishop    ['intrusion', 'xyz.openbmc_project.intrusionsensor.service'],
15*275f7c39SAndrew Jeffery    ['mctp', 'xyz.openbmc_project.mctpreactor.service'],
1649d12d89SEd Tanous    ['mcu', 'xyz.openbmc_project.mcutempsensor.service'],
17feb19ef0SBrad Bishop    ['nvme', 'xyz.openbmc_project.nvmesensor.service'],
183a18b860SLei YU    ['psu', 'xyz.openbmc_project.psusensor.service'],
19a62c069fSJeff Lin    ['external', 'xyz.openbmc_project.externalsensor.service'],
20feb19ef0SBrad Bishop]
21feb19ef0SBrad Bishop
228eb514a4SAndrew Jefferyfs = import('fs')
23feb19ef0SBrad Bishopforeach tuple : unit_files
245bc307fbSPatrick Williams    if get_option(tuple[0]).allowed()
258eb514a4SAndrew Jeffery        fs.copyfile(
268eb514a4SAndrew Jeffery            tuple[1],
27feb19ef0SBrad Bishop            install: true,
28feb19ef0SBrad Bishop            install_dir: systemd_system_unit_dir,
29feb19ef0SBrad Bishop        )
30feb19ef0SBrad Bishop    endif
31feb19ef0SBrad Bishopendforeach
32