Metadata

This document will provide details about how to add the additional information that is needed in your application's packaging in order to properly display your application icon, screenshot, application title and category when viewed using the Ubuntu Software Center.

Summary of Steps

There are four basic steps necessary to adding the needed information in your packaging. Each of the steps will be described in more detail in the sections that follow.

  1. Adding a set of five custom "XB-" fields in your debian/control file. These fields define the metadata information.
  2. Renaming your application icon file name to be based on your package name (if it is not already named this way; for instance, in Quickly all icons are generically named "icon.png" by default).
  3. Incorporating dpkg-distaddfile into your debian/rules file to enable the upload and publishing of your application icon by Launchpad.
  4. Uploading your application's screenshot and associated thumbnail.

Add Custom Metadata Fields to debian/control

A set of five custom "XB-" fields have been defined for applications in the extras.ubuntu.com repository. These fields should be located in the binary (not source) paragraph of your debian/control file.

  • XB-AppName: This field specifies the name of your application as defined in your .desktop file's Name= field.

  • XB-Icon: This field specifies your application's icon file name.

  • XB-Screenshot-Url: This field specifies the URL to your package's screenshot on screenshots.ubuntu.com.

  • XB-Thumbnail-Url: This field specifies the URL to the thumbnail for your package screenshot on screenshots.ubuntu.com.

  • XB-Category: This field specifies your application category string as defined in the Category= field of your .desktop file.

Example debian/control file including custom metadata fields:

Source: daily-journal
Section: python
Priority: extra
Build-Depends: cdbs (>= 0.4.43),
 debhelper (>= 6),
 python,
 python-support (>= 0.6.4),
 python-distutils-extra (>= 2.10)
Maintainer: Rick Spencer <rick.spencer@canonical.com>
Standards-Version: 3.8.3
XS-Python-Version: current

Package: daily-journal
Architecture: all
XB-Python-Version: ${python:Versions}
XB-AppName: Daily Journal
XB-Icon: daily-journal.png
XB-Screenshot-Url: https://software-center.ubuntu.com/screenshots/d/daily-journal-maverick.png
XB-Thumbnail-Url: https://software-center.ubuntu.com/screenshots/d/daily-journal-maverick.thumb.png
XB-Category: GNOME;Utility;
Depends: ${misc:Depends},
 ${python:Depends},
 quickly-widgets,
 python-gtk2,
 python-desktopcouch-records
Description: Journal application with a strong focus on simplicity
 Daily Journal is a journal application for Ubuntu that keeps one page
 per day that it is used. The focus in on letting you take your notes.
 There is no file management, formatting, or other complexity imposed. If
 you have a Ubuntuone account, your diary will be automatically
 syncronized across your computers.

Icon Filename

In the current icon publishing scheme on Launchpad, all icon files are published to a single directory (http://extras.ubuntu.com/meta/). Therefore, to insure unique filenames it's suggested that you name your icon file using the associated package name if it is not already named as such.

Note that if you do change your icon filename, you must also be sure to change any instances of the filename in your code and packaging correspondingly.

Add Icon Upload and Publishing Support in debian/rules

The dpkg-distaddfile command is used by Launchpad for publishing your application's icon to a PPA and to the extras.ubuntu.com directory. Its use is straightforward as shown the the example debian/rules file below:

DEB_PYTHON_SYSTEM := pysupport

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/langpack.mk

common-install-indep::
        cp data/media/daily-journal.png ..
        dpkg-distaddfile daily-journal.png raw-meta-data -

Upload Your Application Screenshot and Thumbnail

The procedure for uploading your application's screenshot and thumbnail files is as follows:

  1. Create PNG files for your screenshot and thumbnail. Name them as <package-name>-<distro-series>.png and <package-name>-<distro-series>.thumb.png.

  2. Create a bzr branch of lp:~commercial-ppa-uploaders/software-center/additional-screenshots
  3. In the branch, add your screenshots in the directory corresponding to the first letter of your application's package name.
  4. Upload your branch and submit a merge request.

Future Work

  • Improve the implementation and automate things as needed such that these manual steps are no longer necessary.

PostReleaseApps/Metadata (last edited 2011-02-02 16:33:54 by gary-lasker)