Guidelines and HOWTOs/AppStream
Quick guide on how to AppStream your app.
Checklist
- Make sure your desktop file is reverse-domain-notation i.e. org.kde.foo
- Your desktop file should be org.kde.foo.desktop. This is also your desktop-id, so whenver you may need that. It's basically your file name.
- If you have a dbus service ... make sure that your dbus service name matches this or change your desktop file to match the service address (whichever seems more appropriate)
- Create org.kde.foo.appdata.xml in your source tree
- Paste the template you can find below into that file
- Make sure you replaced all place holders from the template
- Install the file via CMake (KDE_INSTALL_METAINFODIR is defined by KDEInstallDirs from extra-cmake-modules)
1 install(FILES org.kde.foo.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
- Validate your appdata using the appstreamcli helper
appstreamcli validate org.kde.foo.appdata.xml
- Validate your installed tree using the helper in your build directory
make make install DESTDIR=root appstreamcli validate-tree root rm -r root
- If all looks good commit and push
- If you have any questions submit a review and make sure to subscribe sitter and mak
Template
Carefully review all fields and replace $NAME with your application name as seen in the reverse domain notation. Where appropriate the fields have URLs of AppStream documentation to help you find out what to put there.
1 <?xml version="1.0" encoding="utf-8"?> 2 <component type="desktop"> 3 <id>org.kde.$NAME.desktop</id> 4 <metadata_license>CC0-1.0</metadata_license> 5 <project_license> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license </project_license> 6 <name>$NAME</name> 7 <summary> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-summary </summary> 8 <description> 9 <p> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description </p> 10 </description> 11 <url type="homepage">https://www.kde.org</url> 12 <url type="bugtracker">https://bugs.kde.org</url> 13 <url type="donation">https://www.kde.org/community/donations</url> 14 <screenshots> 15 <screenshot type="default"> 16 <image> 17 https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-screenshots 18 Central hosting is still being sorted out, poke [email protected] for more info. 19 </image> 20 </screenshot> 21 </screenshots> 22 <provides> 23 <binary>$YOURBINARYNAME!</binary> 24 </provides> 25 <project_group>KDE</project_group> 26 </component>
Content is available under Creative Commons License SA 4.0 unless otherwise noted.