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 = [ |
Jason M. Bills | 0e89e19 | 2025-04-23 07:55:14 -0700 | [diff] [blame^] | 8 | [ |
| 9 | 'phosphor-u-boot-env-mgrd', |
| 10 | 'xyz.openbmc_project.U_Boot.Environment.Manager.service', |
| 11 | ], |
Chris Sides | 516faac | 2024-05-17 14:59:47 -0500 | [diff] [blame] | 12 | ] |
| 13 | |
| 14 | fs = import('fs') |
| 15 | foreach 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. Bills | 0e89e19 | 2025-04-23 07:55:14 -0700 | [diff] [blame^] | 23 | endforeach |