Qt API | Qtopia API | Qtopia Documentation |

## Qtopia - Distribution Packaging

Packages for Qtopia devices should be distributed in IPKG format.

Packages for Linux/X11 desktop systems (i.e. development systems) should be distributed in RPM format.

Both of these formats are supported by the `mkipks` program which is part of the Qtopia SDK. This program takes a control file and produces either an IPKG file or an RPM file. Sample control files are included in the Qtopia SDK, such as example.control.

The control file has the following form:

    Files: bin/foo apps/Applications/foo.desktop etc/foo.dat
    Priority: optional
    Section: qpe/applications
    Maintainer: Your Name <you@yourdomain.com>
    Version: 1.2.3-1
    Depends: qpe-base
    Description: Very brief description.
     A much longer
     multi-line
     description.

The following fields are supported:

- `Files` - List of files relative to $QPEDIR, wildcards are permitted.
- `Priority` - The priority (normally "optional").
- `Section` - The classification of the package. The categories recognized by Qtopia Desktop are:
  - qpe/applications
  - qpe/games
  - qpe/settings
  - qpe/system
  - kernel
  - base
  - libs
  - qpe/taskbar
  - qpe/styles
  - qpe/inputmethods
  - qpe/decorations
  - qpe/plugins
- `Maintainer` - The contact person for the package.
- `Version` - The version number should be suffixed by -n, the package number which allows the package builder to rebuild in cases of error.
- `Depends` - comma-seperated list of packages which this package requires.
- `Description` - one line description, then multiple lines, with a leading space, to the end of the control file.

Other IPKG fields are passed through unchanged to the the control file within the resulting .ipk file. See the documentation of the ipkg program for more information.

For IPKG format, you may also have files with the same name as the control file, but with the .control suffix replaced by one of the following:

Suffix | Notes
--- | ---
.preinst | This script will execute before files are moved into place at installation.

.postinst

This script will execute after files are moved into place at installation. Common uses of this script are:

- `qtopia-addmimetype type/subtype extension` -- add a MIME type for your application.
- `/opt/Qtopia/bin/qcop QPE/TaskBar "reloadInputMethods()"` -- reload input methods if your software is an input method plugin.
- `/opt/Qtopia/bin/qcop QPE/TaskBar "reloadApplets()"` -- reload applets if your software is a taskbar applet.

.prerm | This script will execute before files are removed at de-installation.

.postrm

This script will execute after files are removed at de-installation. Common uses of this script are:

- `/opt/Qtopia/bin/qcop QPE/TaskBar "reloadInputMethods()"` -- reload input methods if your software was an input method plugin.
- `/opt/Qtopia/bin/qcop QPE/TaskBar "reloadApplets()"` -- reload applets if your software was a taskbar applet.