meson.build 909 B

12345678910111213141516171819202122232425262728
  1. dep_systemd = dependency('systemd', required: opt_systemd)
  2. if not dep_systemd.found()
  3. subdir_done()
  4. endif
  5. dir_systemd = get_option('systemd_dir')
  6. if dir_systemd == ''
  7. if meson_version.version_compare('>=0.58')
  8. dir_systemd = dep_systemd.get_variable('systemdsystemunitdir', pkgconfig_define: ['prefix', prefix])
  9. else
  10. dir_systemd = dep_systemd.get_pkgconfig_variable('systemdsystemunitdir', define_variable: ['prefix', prefix])
  11. endif
  12. endif
  13. systemd_conf = configuration_data()
  14. systemd_conf.set('sysconfdir', dir_sysconf)
  15. systemd_conf.set('sbindir', dir_sbin)
  16. configure_file(input: 'tinc.service.in',
  17. output: 'tinc.service',
  18. configuration: systemd_conf,
  19. install_dir: dir_systemd)
  20. configure_file(input: 'tinc@.service.in',
  21. output: 'tinc@.service',
  22. configuration: systemd_conf,
  23. install_dir: dir_systemd)