Add release information to metainfo file
This commit is contained in:
parent
c30809747a
commit
e5bf215274
@ -3,16 +3,24 @@
|
||||
install_data('asgen-hints.json', install_dir: 'share/appstream')
|
||||
install_data('hicolor-theme-index.theme', install_dir: 'share/appstream')
|
||||
|
||||
metainfo_file = files('org.freedesktop.appstream.generator.metainfo.xml')
|
||||
install_data(metainfo_file, install_dir: join_paths (get_option ('datadir'), 'metainfo'))
|
||||
appstreamcli_exe = find_program('appstreamcli', required: false)
|
||||
if appstreamcli_exe.found()
|
||||
ascli_exe = find_program('appstreamcli', required: true)
|
||||
|
||||
metainfo_filename = 'org.freedesktop.appstream.generator.metainfo.xml'
|
||||
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
|
||||
test('asgen-validate_metainfo',
|
||||
appstreamcli_exe,
|
||||
ascli_exe,
|
||||
args: ['validate',
|
||||
'--no-net', '--pedantic',
|
||||
metainfo_file]
|
||||
files(metainfo_filename)]
|
||||
)
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user