Add release information to metainfo file

This commit is contained in:
Matthias Klumpp 2023-05-07 03:06:34 +02:00
parent c30809747a
commit e5bf215274

View File

@ -3,16 +3,24 @@
install_data('asgen-hints.json', install_dir: 'share/appstream') install_data('asgen-hints.json', install_dir: 'share/appstream')
install_data('hicolor-theme-index.theme', install_dir: 'share/appstream') install_data('hicolor-theme-index.theme', install_dir: 'share/appstream')
metainfo_file = files('org.freedesktop.appstream.generator.metainfo.xml') ascli_exe = find_program('appstreamcli', required: true)
install_data(metainfo_file, install_dir: join_paths (get_option ('datadir'), 'metainfo'))
appstreamcli_exe = find_program('appstreamcli', required: false) metainfo_filename = 'org.freedesktop.appstream.generator.metainfo.xml'
if appstreamcli_exe.found() metainfo_with_relinfo = custom_target('add-metainfo-releases',
input : ['../NEWS', files(metainfo_filename)],
output : [metainfo_filename],
command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
install : true,
install_dir : join_paths (get_option ('datadir'), 'metainfo')
)
if ascli_exe.found()
# Validate our MetaInfo file # Validate our MetaInfo file
test('asgen-validate_metainfo', test('asgen-validate_metainfo',
appstreamcli_exe, ascli_exe,
args: ['validate', args: ['validate',
'--no-net', '--pedantic', '--no-net', '--pedantic',
metainfo_file] files(metainfo_filename)]
) )
endif endif