xref: /openbmc/phosphor-misc/firstboot/meson.build (revision 403e26351c06783fac9de012167d408a89d333ee)
1set_mac = dependency('systemd', required: get_option('first-boot-set-mac'))
2set_hostname = dependency('systemd', required: get_option('first-boot-set-hostname'))
3
4if set_mac.found()
5    install_data(
6        'first-boot-set-mac.sh',
7        install_mode: 'rwxr-xr-x',
8        install_dir: get_option('bindir'),
9    )
10
11    configure_file(
12        input: 'first-boot-set-mac@.service',
13        output: 'first-boot-set-mac@.service',
14        copy: true,
15        install_dir:
16            set_mac.get_pkgconfig_variable('systemdsystemunitdir'),
17    )
18endif
19
20if set_hostname.found()
21    install_data(
22        'first-boot-set-hostname.sh',
23        install_mode: 'rwxr-xr-x',
24        install_dir: get_option('bindir'),
25    )
26
27    configure_file(
28        input: 'first-boot-set-hostname.service',
29        output: 'first-boot-set-hostname.service',
30        copy: true,
31        install_dir:
32            set_hostname.get_pkgconfig_variable('systemdsystemunitdir'),
33    )
34endif
35