blob: b8d0dcb73402b1502716caed808a22982d35d0f9 [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 = [
8 ['phosphor-u-boot-env-mgrd', 'xyz.openbmc_project.U_Boot.Environment.Manager.service'],
9]
10
11fs = import('fs')
12foreach 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
20endforeach