meson.build 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. systemd = dependency('systemd', required: false)
  2. sd_reply_pass = find_program(
  3. join_paths(get_option('prefix'), get_option('libdir'), 'systemd', 'systemd-reply-password'),
  4. join_paths(get_option('prefix'), 'lib', 'systemd', 'systemd-reply-password'),
  5. join_paths('/', 'usr', get_option('libdir'), 'systemd', 'systemd-reply-password'),
  6. join_paths('/', 'usr', 'lib', 'systemd', 'systemd-reply-password'),
  7. required: false
  8. )
  9. if systemd.found() and sd_reply_pass.found()
  10. data.set('SYSTEMD_REPLY_PASS', sd_reply_pass.path())
  11. unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
  12. configure_file(
  13. input: 'clevis-luks-askpass.service.in',
  14. output: 'clevis-luks-askpass.service',
  15. install_dir: unitdir,
  16. configuration: data,
  17. )
  18. configure_file(
  19. input: 'clevis-luks-askpass.in',
  20. output: 'clevis-luks-askpass',
  21. install_dir: libexecdir,
  22. configuration: data
  23. )
  24. install_data('clevis-luks-askpass.path', install_dir: unitdir)
  25. else
  26. warning('Will not install systemd support due to missing dependencies!')
  27. endif