dh_installxmlcatalogs
Install XML catalog files into Debian packages
SYNOPSIS
dh_installxmlcatalogs [debhelper options]
PARAMETERS
[debhelper options]
Like most debhelper commands, dh_installxmlcatalogs primarily uses the standard debhelper options, which are documented in debhelper(7). These options control various aspects of package building, such as verbosity, acting on specific packages, or simulating execution.
Examples include:
-v, --verbose: Enable verbose output.
-d, --debug: Enable debug output.
-n, --no-act: Don't actually do anything, just show what would be done.
-ppackage, --package=package: Act only on the specified package.
-A, --all: Act on all packages listed in `debian/control`.
DESCRIPTION
dh_installxmlcatalogs is a debhelper program that helps in installing and registering XML catalogs for Debian packages. XML catalogs are used by XML parsers (like libxml2) to map public and system identifiers to local files, which is useful for validating XML documents against DTDs or schemas without requiring network access.
This command scans for XML catalog files (typically ending with .cat or .xml) found in the package build directory (usually debian/tmp/). It then installs these catalog files into the correct system-wide XML catalog directory (e.g., /etc/xml/catalog.d). Crucially, it also registers them with the system's central XML catalog (e.g., /etc/xml/catalog), ensuring they are discoverable by XML-aware applications. The registration process typically involves using the xmlcatalog(1) utility. It automatically handles common paths for XML catalogs and adheres to Debian policy for XML resources. This command should be called from debian/rules, often via dh(1).
CAVEATS
This command is part of the Debian packaging system and is not intended for direct use by end-users. It relies on the xmlcatalog(1) utility, which is typically provided by the `libxml2-utils` package, being available on the system. It primarily handles installation and registration of public and system identifiers within XML catalogs, adhering to Debian policy for XML resources.
TYPICAL USAGE IN <I>DEBIAN/RULES</I>
dh_installxmlcatalogs is usually invoked indirectly by the dh(1) command, often as part of the default `dh $@` sequence in debian/rules. For instance, if your package uses XML catalogs, you might simply call `dh $@` in your debian/rules file, and debhelper will determine that dh_installxmlcatalogs needs to be run. Alternatively, you can explicitly ensure its execution by adding --with xmlcatalogs to your dh command, e.g., `dh $@ --with xmlcatalogs`.
HISTORY
Before the advent of dh_installxmlcatalogs, Debian package maintainers manually managed the installation and registration of XML catalogs within their debian/rules files. This often involved writing complex shell commands to interact with xmlcatalog(1), leading to potential inconsistencies and errors across different packages. dh_installxmlcatalogs was introduced as part of the debhelper suite to automate and standardize this process, ensuring that XML catalogs are correctly installed and registered according to Debian policy, thereby simplifying package maintenance and improving the reliability of XML-dependent applications.
SEE ALSO
debhelper(7), dh(1), xmlcatalog(1), dh_install(1)