6.2. The docbook/custom Directory

The definition of a customization package needs to be stated before the purpose and layout of this directory can be described.

6.2.1. Definition: Customization Packages

Customization Packages

A package is a customization package if it meets any of the following criteria:

  1. At least one of the stylesheet files is a customization of an installed stylesheet or stylesheet distribution.

  2. At least one of the schema files is a customization of an installed schema.

6.2.2. Purpose and Layout

Customization packages should place their files in a non-versioned subdirectory of custom. Maintainers may create versioned subdirectories of the package directories, but are not required to do so.

For example, the DocBook Website package has a dtd that is a customization of the DocBook XML DTD and also contains stylesheets that are customizations of the DocBook XSL stylesheets. The layout of the package preserves the upstream layout and would look somehting like this:

/usr/share/sgml/docbook/custom/website/[version]
VERSION
catalog
forms.mod
website.dtd
xsl/
*.xsl
*.xml

In the above, [version] represents the optional version number, for the case when multiple versions are installed.

This policy is consistent with the LSB goal to simplify the packaging of dtd and/or stylesheet customizations.

Note: The above definition implies that dtd-only or stylesheet-only customizations are also defined as customization packages, and are therefore installed into a subdirectory of /usr/share/[DTD-NAME]/custom/[1].

Notes

[1]

To understand why these packages should be placed in the custom/ directory, consider the result of not putting them there.

For example, the DocBook Website contains both dtds and stylesheets, and so would be placed in a subdirectory of custom, such as /usr/share/docbook/custom/website/. Suppose we also packaged some custom website stylesheets distributed by ACME. If these stylesheets were not installed under custom, they would go someplace like /usr/share/docbook/stylesheet/xsl/ACME/website/, far away from the stylesheets they customize, resulting in an inconsistent placement policy.