From Fedora Project Wiki
m (→‎Libraries and Applications: drop extraneous ("libraries"))
 
Line 20: Line 20:


Many packages, regardless of their primary purpose, include both
Many packages, regardless of their primary purpose, include both
applications and libraries.  There are a few options:
applications and libraries.  The following options are available to the packager:


# Split out into one or more subpackages the executables or libraries, following the relevant guidelines.
# Split out into one or more subpackages the executables or libraries, following the relevant guidelines.
Line 26: Line 26:
# Do #2 but also add a Provides: for the name of an application or library according to the regular packaging guidelines.
# Do #2 but also add a Provides: for the name of an application or library according to the regular packaging guidelines.


If the executables have significant dependencies which the libraries
If the executables have any dependencies which the libraries
do not, then #1 MUST be followed.  NOTE: RPM itself may automatically
do not, then #1 MUST be followed.  Note that RPM itself may automatically
add the necessary Provides: and these MUST not be duplicated in case #3.
add the necessary Provides: and these MUST not be duplicated in case #3.

Latest revision as of 17:07, 22 September 2016

Libraries and Applications

Many language- or domain-specific guidelines refer to "libraries", "modules", "plug-ins" or other terms specific to the language or domain. This is specifically important to package naming. Some applications may include libraries, and some libraries may include applications, so the distinction is not always clear.

Library or Application?

  • If the primary purpose of a package is to provide executables to be run by users, it SHOULD be packaged as an application. If it also includes libraries which may be imported or linked to by other code, see #Mixed Use Packages below.
  • If the primary purpose of a package is to provide libraries intended to be imported or loaded into other code, it is considered a library and MUST be packaged as such. If it contains utility programs that can be run by users as well, see #Mixed Use Packages below.

It is left to the packager to determine the primary purpose of a package. Often times upstream will already have done this with their choice of naming and that choice SHOULD be followed by the Fedora packager.

Mixed Use Packages

Many packages, regardless of their primary purpose, include both applications and libraries. The following options are available to the packager:

  1. Split out into one or more subpackages the executables or libraries, following the relevant guidelines.
  2. Simply package as an application or a library and just include the libraries or executables in that package.
  3. Do #2 but also add a Provides: for the name of an application or library according to the regular packaging guidelines.

If the executables have any dependencies which the libraries do not, then #1 MUST be followed. Note that RPM itself may automatically add the necessary Provides: and these MUST not be duplicated in case #3.