meson.build 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. subdir('dracut')
  12. unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
  13. configure_file(
  14. input: 'clevis-luks-askpass.service.in',
  15. output: 'clevis-luks-askpass.service',
  16. install_dir: unitdir,
  17. configuration: data,
  18. )
  19. configure_file(
  20. input: 'clevis-luks-askpass.in',
  21. output: 'clevis-luks-askpass',
  22. install_dir: libexecdir,
  23. configuration: data
  24. )
  25. install_data('clevis-luks-askpass.path', install_dir: unitdir)
  26. else
  27. warning('Will not install systemd support due to missing dependencies!')
  28. endif