Chris Sides | 516faac | 2024-05-17 14:59:47 -0500 | [diff] [blame] | 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 | ['phosphor-u-boot-env-mgrd', 'xyz.openbmc_project.U_Boot.Environment.Manager.service'], |
| 9 | ] |
| 10 | |
| 11 | fs = import('fs') |
| 12 | foreach tuple : unit_files |
| 13 | if get_option(tuple[0]).allowed() |
| 14 | fs.copyfile( |
| 15 | tuple[1], |
| 16 | install: true, |
| 17 | install_dir: systemd_system_unit_dir, |
| 18 | ) |
| 19 | endif |
| 20 | endforeach |