blob: cb1c30b472b83c416768fd95660d554a67fe3234 [file] [log] [blame]
Chris Sides516faac2024-05-17 14:59:47 -05001systemd = dependency('systemd')
2systemd_system_unit_dir = systemd.get_variable(
3 'systemdsystemunitdir',
4 pkgconfig_define: ['prefix', get_option('prefix')],
5)
6
7unit_files = [
Jason M. Bills0e89e192025-04-23 07:55:14 -07008 [
9 'phosphor-u-boot-env-mgrd',
10 'xyz.openbmc_project.U_Boot.Environment.Manager.service',
11 ],
Chris Sides516faac2024-05-17 14:59:47 -050012]
13
14fs = import('fs')
15foreach tuple : unit_files
16 if get_option(tuple[0]).allowed()
17 fs.copyfile(
18 tuple[1],
19 install: true,
20 install_dir: systemd_system_unit_dir,
21 )
22 endif
Jason M. Bills0e89e192025-04-23 07:55:14 -070023endforeach