Gimp/desktop/meson.build
Jehan 9368c8abdd desktop: fix AppStream validation with TODO release date.
As I recall, this is something we in fact used to have in gimp-2-10
branch and which we lost when switching from appstream-util to
appstreamcli validation tool (the later is now recommended, but it's
also less featureful, they don't even have a relax test!). So that was a
regression in the build system.

Note that it's not just not to have to put a date too early in our
AppStream metadata, but it's also that this way, we won't forget to
update it upon release (hence shipping with a wrong release data in
metadata). Indeed, when building a non-release version, date="TODO" will
pass the test, yet moving on to a point release version, the validation
test will now fail on a TODO date.
2024-08-29 23:19:58 +02:00

56 lines
1.4 KiB
Meson

desktopfilename = 'gimp.desktop'
desktop_conf = configuration_data()
desktop_conf.set('GIMP_COMMAND', gimp_command)
desktop_conf.set('GIMP_VERSION', gimp_version)
desktop_conf.set('GIMP_APP_VERSION', gimp_app_version)
desktop_conf.set('MIME_TYPES', ';'.join(MIMEtypes))
desktop_conf.set('BUG_REPORT_URL', bug_report_url)
desktopfilein = configure_file(
input : desktopfilename+'.in.in',
output: desktopfilename+'.in',
configuration: desktop_conf,
)
desktopfile = i18n.merge_file(
input : desktopfilein,
output: desktopfilename,
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: get_option('datadir') / 'applications',
)
appdatafilename = 'org.gimp.GIMP.appdata.xml'
appdatafilein = configure_file(
input : appdatafilename+'.in.in',
output: appdatafilename+'.in',
configuration: desktop_conf,
)
appdatafile = i18n.merge_file(
input : appdatafilein,
output: appdatafilename,
po_dir: po_dir,
install: true,
install_dir: get_option('datadir') / 'metainfo',
)
if desktop_validate.found()
test('validate-desktop',
desktop_validate,
args: [ desktopfile ],
suite: 'desktop',
)
endif
if appstreamcli.found()
test('appdata_file',
find_program('test-appdata.sh', required: true, dirs: [meson.current_source_dir()]),
env: [
'GIMP_TESTING_BUILDDIR=' + meson.current_build_dir(),
'GIMP_RELEASE=' + (release ? '1' : '0'),
],
suite: 'desktop',
)
endif