3.2. Registering/Deregistering Resources

It is recommended that package maintainers make use of the dh_installcatalogs debhelper script, rather than calling update-catalog in the package maintainer scripts. dh_installcatalogs automatically adds the appropriate code snippets to the maintainer scripts. For more information see the man page or the next section on using dh_installcatalogs.

3.2.1. Using dh_installcatalogs with SGML Catalogs

This section provides basic information developers will need to use dh_installcatalogs to register these resources in the SGML catalog system.

The file debian/package.sgmlcatalogs lists the local SGML catalog files to be installed per package and registered in the SGML catalog system.

Each line in that file should be of the form "source dest", where source indicates where the local SGML catalog resides in the source tree, and dest indicates the destination location for the local SGML catalog under the package build area. dest should start with /usr/share/sgml/.

The local SGML catalog files listed in the file will be registered in the SGML package catalog file /etc/sgml/package.cat. Furthermore, this package catalog file will be registered in the SGML root catalog file /etc/sgml/catalog. An example will clarify the format of debian/package.sgmlcatalogs.

Example 3.2. debian/tei-xlite.sgmlcatalogs

tei-xlite is a single-catalog package, so the debian/tei-xlite.sgmlcatalogs file is quite simple:

debian/catalog  /usr/share/xml/tei/custom/lite/catalog

The content of this file is sufficient to properly register the catalog in both the root and the package catalogs.