@@ -26,30 +26,28 @@ if desktop_file_validate.found()
2626 )
2727endif
2828
29- # Appdata
30- appdata_conf = configuration_data ()
31- appdata_conf.set(' app-id' , application_id)
32- appdata_conf.set(' gettext-package' , gettext_package)
33- appdata_file = i18n.merge_file(
29+ # Translate and install Metainfo file
30+ metainfo_file = i18n.merge_file(
3431 input : configure_file (
3532 input :
' @[email protected] ' .format(base_id),
3633 output : ' @BASENAME@' ,
37- configuration : appdata_conf
34+ configuration : configuration_data ({
35+ ' app-id' : application_id,
36+ ' gettext-package' : gettext_package
37+ })
3838 ),
3939 output :
' @[email protected] ' .format(application_id),
4040 po_dir : podir,
4141 install : true ,
4242 install_dir : join_paths (get_option (' datadir' ), ' metainfo' )
4343)
4444
45- # Validate Appdata
46- if appstream_util.found()
47- test (
48- ' validate-appdata' , appstream_util,
49- args : [
50- ' validate-relax' , ' --nonet' , appdata_file.full_path()
51- ],
52- depends : appdata_file,
45+ # Validate Metainfo file
46+ appstream_cli = find_program (' appstreamcli' , required : false )
47+ if appstream_cli.found()
48+ test (' Validate metainfo file' , appstream_cli,
49+ args : [' validate' , ' --no-net' , ' --explain' , metainfo_file.full_path()],
50+ depends : metainfo_file
5351 )
5452endif
5553
0 commit comments