(Expanded Directory Ownership section) |
mNo edit summary |
||
Line 28: | Line 28: | ||
== Directory Ownership == | == Directory Ownership == | ||
Mozilla extension packages should Require mozilla-filesystem for common directories, but avoid depending on specific Mozilla applications. For each of the supported Mozilla application, the extension package installs a symlink to the %_<appname>_extdir/ and should also own the directory. | Mozilla extension packages should Require mozilla-filesystem for common directories, but avoid depending on specific Mozilla applications. For each of the supported Mozilla application, the extension package installs a symlink to the <code>%{_<appname>_extdir}</code> and should also own the directory. | ||
Sample %files section: | Sample %files section: | ||
Line 39: | Line 39: | ||
Rationale: | Rationale: | ||
RPM needs to keep track of the installed directories, so that it could remove them on uninstall. When installing extensions, we drop symlinks to multiple application directories and want to avoid depending on these apps just to satisfy directory ownership requirements. Because of that, Mozilla extension packages need to own all the %_<appname>_extdir directories they drop symlinks in. | RPM needs to keep track of the installed directories, so that it could remove them on uninstall. When installing extensions, we drop symlinks to multiple application directories and want to avoid depending on these apps just to satisfy directory ownership requirements. Because of that, Mozilla extension packages need to own all the <code>%{_<appname>_extdir}</code> directories they drop symlinks in. | ||
== Macros == | == Macros == |
Revision as of 12:14, 11 August 2011
Draft for Packaging Mozilla Extensions
This is a draft for packaging extensions for Mozilla applications: Firefox, Thunderbird, Seamonkey, and others.
Naming
Packages of Mozilla extensions should take into account the upstream name of the extension. All Mozilla extensions MUST follow the scheme of mozilla-<extension>, where <extension> is the name of the extension. Examples include mozilla-adblockplus, mozilla-noscript.
Rationale:
Installation Directories
Packages for Mozilla extensions should place unpacked files in %{_datadir}/mozilla/extensions/common/<extension>/ directory, where <extension> is the name of the package without the mozilla- prefix. Packages that contain architecture specific files should instead use %{_libdir}/mozilla/extensions/<extension>/ directory.
To register an extension for a Mozilla application, the package should drop into the application's extension directory symlinks which point to the actual files in the %{_datadir}/mozilla/extensions/common/<extension>/ directory.
For an example, to register the extension for Mozilla and Thunderbird, the package should:
# Firefox mkdir -p $RPM_BUILD_ROOT%{_firefox_extdir} ln -s %{_moz_ext_commondir}/{extension_name} $RPM_BUILD_ROOT%{_firefox_extdir}/{extension_id} # Thunderbird mkdir -p $RPM_BUILD_ROOT%{_thunderbird_extdir} ln -s %{_moz_ext_commondir}/{extension_name} $RPM_BUILD_ROOT%{_thunderbird_extdir}/{extension_id}
Rationale:
Directory Ownership
Mozilla extension packages should Require mozilla-filesystem for common directories, but avoid depending on specific Mozilla applications. For each of the supported Mozilla application, the extension package installs a symlink to the %{_<appname>_extdir}
and should also own the directory.
Sample %files section:
%{_mozilla_common_extdir}/%{name}/ %{_firefox_extdir}/ %{_seamonkey_extdir}/ %{_thunderbird_extdir}/
Rationale:
RPM needs to keep track of the installed directories, so that it could remove them on uninstall. When installing extensions, we drop symlinks to multiple application directories and want to avoid depending on these apps just to satisfy directory ownership requirements. Because of that, Mozilla extension packages need to own all the %{_<appname>_extdir}
directories they drop symlinks in.
Macros
Macro | Usage |
---|---|
_moz_ext_commondir | Directory where extension packages should install actual files. |
_chatzilla_extdir | Chatzilla extension directory for dropping symlinks in |
_firefox_extdir | Firefox extension directory for dropping symlinks in |
_seamonkey_extdir | Seamonkey extension directory for dropping symlinks in |
_spicebird_extdir | Spicebird extension directory for dropping symlinks in |
_sunbird_extdir | Sunbird extension directory for dropping symlinks in |
_thunderbird_extdir | Thunderbird extension directory for dropping symlinks in |