appdata: Improve appdata for AppStream 1.0

- Add appstreamcli support to validate the appdata file.
- Add missing release information.
- Use the `<developer><name>` tag instead of the deprecated `<developer_name>`
This commit is contained in:
Sabri Ünal
2023-12-17 21:06:04 +03:00
parent 44f52c244c
commit 3e56d57240
2 changed files with 19 additions and 3 deletions

View File

@ -8,13 +8,24 @@ if get_option('gtk') and get_option('libsysprof')
output: 'org.gnome.Sysprof.appdata.xml.in',
configuration: config_h,
)
i18n.merge_file(
appdata_file = i18n.merge_file(
input: appdata_in,
output: '@0@.appdata.xml'.format(app_id),
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
# Validate Appdata
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test(
'validate-appdata', appstreamcli,
args: [
'validate', '--no-net', '--explain', appdata_file
],
depends: appdata_file,
)
endif
desktop_in = configure_file(
input: 'org.gnome.Sysprof.desktop.in.in',