meson.build 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. luksmeta_data = configuration_data()
  2. luksmeta = dependency('luksmeta', version: '>=8', required: false)
  3. pwmake = find_program('pwmake', required: false)
  4. libcryptsetup = dependency('libcryptsetup', version: '>=2.0.4', required: false)
  5. if libcryptsetup.found()
  6. luksmeta_data.set('OLD_CRYPTSETUP', '0')
  7. else
  8. libcryptsetup = dependency('libcryptsetup', version: '>=2.0.2', required: false)
  9. if libcryptsetup.found()
  10. luksmeta_data.set('OLD_CRYPTSETUP', '1')
  11. warning('Old version of cryptsetup found, forcing use of luksmeta')
  12. endif
  13. endif
  14. clevis_luks_bind = configure_file(input: 'clevis-luks-bind.in',
  15. output: 'clevis-luks-bind',
  16. configuration: luksmeta_data)
  17. clevis_luks_unbind = configure_file(input: 'clevis-luks-unbind.in',
  18. output: 'clevis-luks-unbind',
  19. configuration: luksmeta_data)
  20. if libcryptsetup.found() and luksmeta.found() and pwmake.found()
  21. subdir('systemd')
  22. subdir('udisks2')
  23. bins += clevis_luks_unbind
  24. mans += join_paths(meson.current_source_dir(), 'clevis-luks-unbind.1')
  25. bins += clevis_luks_bind
  26. mans += join_paths(meson.current_source_dir(), 'clevis-luks-bind.1')
  27. mans += join_paths(meson.current_source_dir(), 'clevis-luks-unlockers.7')
  28. bins += join_paths(meson.current_source_dir(), 'clevis-luks-common-functions')
  29. bins += join_paths(meson.current_source_dir(), 'clevis-luks-list')
  30. mans += join_paths(meson.current_source_dir(), 'clevis-luks-list.1')
  31. bins += join_paths(meson.current_source_dir(), 'clevis-luks-unlock')
  32. mans += join_paths(meson.current_source_dir(), 'clevis-luks-unlock.1')
  33. bins += join_paths(meson.current_source_dir(), 'clevis-luks-regen')
  34. mans += join_paths(meson.current_source_dir(), 'clevis-luks-regen.1')
  35. bins += join_paths(meson.current_source_dir(), 'clevis-luks-report')
  36. mans += join_paths(meson.current_source_dir(), 'clevis-luks-report.1')
  37. bins += join_paths(meson.current_source_dir(), 'clevis-luks-edit')
  38. mans += join_paths(meson.current_source_dir(), 'clevis-luks-edit.1')
  39. else
  40. warning('Will not install LUKS support due to missing dependencies!')
  41. endif
  42. # Tests.
  43. subdir('tests')