From 3e56d57240c3a63418119e0f2374c2b507dcd118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sabri=20=C3=9Cnal?= Date: Sun, 17 Dec 2023 21:06:04 +0300 Subject: [PATCH] appdata: Improve appdata for AppStream 1.0 - Add appstreamcli support to validate the appdata file. - Add missing release information. - Use the `` tag instead of the deprecated `` --- data/meson.build | 13 ++++++++++++- data/org.gnome.Sysprof.appdata.xml.in.in | 9 +++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/data/meson.build b/data/meson.build index eaeb4567..34fd9587 100644 --- a/data/meson.build +++ b/data/meson.build @@ -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', diff --git a/data/org.gnome.Sysprof.appdata.xml.in.in b/data/org.gnome.Sysprof.appdata.xml.in.in index 42e79357..61cfcca3 100644 --- a/data/org.gnome.Sysprof.appdata.xml.in.in +++ b/data/org.gnome.Sysprof.appdata.xml.in.in @@ -7,7 +7,9 @@ Profile an application or entire system GPL-3.0+ GNOME - The GNOME Foundation + + The GNOME Project +

Sysprof allows you to profile applications to aid in debugging and optimization.

@@ -41,7 +43,10 @@ - + + + + CC0-1.0