1 dep_systemd = dependency('systemd', required: opt_systemd)
2 if not dep_systemd.found()
6 dir_systemd = get_option('systemd_dir')
8 if meson_version.version_compare('>=0.58')
9 dir_systemd = dep_systemd.get_variable('systemdsystemunitdir', pkgconfig_define: ['prefix', prefix])
11 dir_systemd = dep_systemd.get_pkgconfig_variable('systemdsystemunitdir', define_variable: ['prefix', prefix])
15 systemd_conf = configuration_data()
16 systemd_conf.set('sysconfdir', dir_sysconf)
17 systemd_conf.set('sbindir', dir_sbin)
19 configure_file(input: 'tinc.service.in',
20 output: 'tinc.service',
21 configuration: systemd_conf,
22 install_dir: dir_systemd)
24 configure_file(input: 'tinc@.service.in',
25 output: 'tinc@.service',
26 configuration: systemd_conf,
27 install_dir: dir_systemd)