meson.build 1.22 KB
Newer Older
1 2 3 4 5 6 7 8 9
gnome = import('gnome')
zathura_resources = gnome.compile_resources(
  'resources',
  'zathura.gresource.xml',
  c_name: 'zathura_resources',
  dependencies: files('zathura.css_t', 'org.pwmt.zathura.xml')
)

install_data('org.pwmt.zathura.xml', install_dir: dbusinterfacesdir)
Sebastian Ramacher's avatar
Sebastian Ramacher committed
10
install_data('org.pwmt.zathura.png', install_dir: join_paths(datadir, 'icons', 'hicolor', '128x128', 'apps'))
11 12

i18n = import('i18n')
13 14
podir = join_paths(meson.source_root(), 'po')

Sebastian Ramacher's avatar
Sebastian Ramacher committed
15
desktop = i18n.merge_file('desktop',
16 17
  input: 'org.pwmt.zathura.desktop.in',
  output: 'org.pwmt.zathura.desktop',
18 19
  install: true,
  install_dir: desktopdir,
20
  po_dir: podir,
21 22
  type: 'desktop'
)
Sebastian Ramacher's avatar
Sebastian Ramacher committed
23

24 25 26 27 28 29 30 31
appdata = i18n.merge_file('appdata',
  input: 'org.pwmt.zathura.appdata.xml.in',
  output: 'org.pwmt.zathura.appdata.xml',
  install: true,
  install_dir: metainfodir,
  po_dir: podir,
)

Sebastian Ramacher's avatar
Sebastian Ramacher committed
32 33 34 35 36 37 38
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
  test('validate-desktop',
    desktop_file_validate,
    args: [desktop.full_path()]
  )
endif
39 40 41 42 43 44 45 46

appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
  test('validate-appdata',
    appstream_util,
    args: ['validate-relax', appdata.full_path()]
  )
endif