this part is deprecated since Firefox use Web-Extenstions and Thunderbird Mail-Extensions You can get more information at the ?Team-Site
Policy for packaging extensions for XUL based applications
This is a draft and up for discussion on pkg-mozext-maintainers@lists.alioth.debian.org:
Filesystem Placement and Linking
The unpacked extension directory should be symlinked into the applications directory of every XUL application that can use the extension. For example, the package for an extension "adblock-plus" (em-id {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}) which works with Iceape (app-id {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}) and Iceweasel (app-id {ec8030f7-c20a-464f-9b0e-13a3a9e97384}) should drop links into both /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} and /usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}, each pointing to the unpacked extension directory. The extension can be installed directly into the applications directory instead of symlinking it if the extension supports only one XUL application.
Package Naming
The binary package's name should be xul-ext-<ext> with <ext> being the extension's name. E.g. xul-ext-nostalgy for Icedove's nostalgy extension. The source package's name should be <ext> or <ext>-extension if the name is too generic. E.g. adblock-plus, nostalgy, notify-extension.
In order to ease finding extensions for a given application the packages should
Provides: <xul-based-app1>-<extension>, <xul-based-app2>-<extension>, ...
and
Enhances: <xul-based-app1>, <xul-based-app2>, ...
where xul-based-app1 and xul-based-app2 are e.g. iceweasel and iceape.
Rationale:
- canonical place to look for extensions in the filesystem instead of having them spread across several directories (iceape, iceowl, icedove, iceweasel, ...)
consistent naming (visual grouping) for all extension packages (no mozilla-<ext> vs. iceweasel-<ext> for extensions supporting more than one XUL based application)
- eases automatic packaging of extensions
- ease work for downstream distributions which might use upstream's trademarked names for the XUL apps (e.g. if Ubuntu distributes "firefox" packages instead of "iceweasel", they can continue to ship xul-ext-fubar).
Config Files
Note that many extensions contain default preferences files (e.g. defaults/preferences/fubar.js). Site administrators may want to override these preferences for their users, so they should be treated as conffiles. The simplest way to do this is to place an empty file under /etc/xul-ext (e.g. /etc/xul-ext/fubar.js), and create a symlink from defaults/preferences/000system.js in the unpacked xpi tree pointing to the file under /etc/xul-ext.
Implementation/Tools
It is recommended to use mozilla-devscripts. It will realize the policy for you.