What is the right way to carry a appdata.xml file with autotools?
The documentation says that it should be installed at /usr/share/appdata/%{id}.appdata.xml
. Is it the developer or the packager's responsibility?
What about translation? How to make the appdata.xml translatable? The documentation evokes appdata.xml.in but does not give a full example.
Actually, the documentation provides a sample.
In Makefile.am
, add
@INTLTOOL_XML_RULE@
appdatadir = $(datarootdir)/appdata
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdata_in_files = YOURAPP.appdata.xml.in
CLEANFILES = \
...
$(appdata_DATA) \
...
And provides a file YOURAPP.appdata.xml.in
with translatable XML tags prefixed with an underscore, for instance <_foobar>translatable text</_foobar>