InstallPathTips

All ARB apps must be installed under /opt, instead of the usual install locations under /usr. This means that you'll need to modify your packages, or maybe even patch your source code, to change the install path.

Requirements

In general, all files for your app must be installed under /opt/extras.ubuntu.com/myappname. This includes all libraries, binaries, scripts, configuration, images, or other media files. There are a few exceptions to this rule:

  • You can install standard documentation files (copyright, changelog, and examples) in /usr/share/doc/<packagename>.

  • You can install the .desktop file in /usr/share/applications (add "extras-" to the filename).
  • You can install .lens and .scope files in /usr/share/unity/lenses/<lensname>/ (add "extras-" to the filenames).

  • You can write configuration files to the user's home directory under ~/.config/myappname.

Build Systems

Every build system has a slightly different way of setting the install path. This page provides a quick summary of how to change the install path for some of the most common build systems. If the build system your app uses isn't listed here, please contact us at app-review-board@lists.ubuntu.com, and we'll help you figure out how to change the install path. Or, if you've already figured it out, let us know and we'll add the details here to help other developers in the future.

Python

If you have your setup.py script configured appropriately, then changing the install path may be as simple as adding 3 lines to your debian/rules file:

PKGDIR=/opt/extras.ubuntu.com/myappname/
[...]
override_dh_auto_install:
        dh_auto_install -- --install-lib=$(PKGDIR) --install-scripts=$(PKGDIR) --install-data=$(PKGDIR)

See our tips for Python apps for more details.

Simple Makefile

If you use the DESTDIR and PREFIX variables in your Makefile install target, then changing the install path may be as simple as adding 2 lines to your debian/rules file:

override_dh_auto_install:
        dh_auto_install -- PREFIX=/opt/extras.ubuntu.com/myapp

See our tips for Makefiles for more details.

AppReviewBoard/Submissions/InstallPathTips (last edited 2012-04-02 20:08:14 by allison)