meson.build 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. desktop_file = i18n.merge_file(
  2. input: 'com.example.TextViewer.desktop.in',
  3. output: 'com.example.TextViewer.desktop',
  4. type: 'desktop',
  5. po_dir: '../po',
  6. install: true,
  7. install_dir: get_option('datadir') / 'applications'
  8. )
  9. desktop_utils = find_program('desktop-file-validate', required: false)
  10. if desktop_utils.found()
  11. test('Validate desktop file', desktop_utils, args: [desktop_file])
  12. endif
  13. appstream_file = i18n.merge_file(
  14. input: 'com.example.TextViewer.metainfo.xml.in',
  15. output: 'com.example.TextViewer.metainfo.xml',
  16. po_dir: '../po',
  17. install: true,
  18. install_dir: get_option('datadir') / 'metainfo'
  19. )
  20. appstreamcli = find_program('appstreamcli', required: false, disabler: true)
  21. test('Validate appstream file', appstreamcli,
  22. args: ['validate', '--no-net', '--explain', appstream_file])
  23. install_data('com.example.TextViewer.gschema.xml',
  24. install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
  25. )
  26. compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
  27. test('Validate schema file',
  28. compile_schemas,
  29. args: ['--strict', '--dry-run', meson.current_source_dir()])
  30. service_conf = configuration_data()
  31. service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
  32. configure_file(
  33. input: 'com.example.TextViewer.service.in',
  34. output: 'com.example.TextViewer.service',
  35. configuration: service_conf,
  36. install_dir: get_option('datadir') / 'dbus-1' / 'services'
  37. )
  38. subdir('icons')