dh_installxmlcatalogs
Install XML catalog files into Debian packages
SYNOPSIS
dh_installxmlcatalogs [debhelper options] [-n] [--no-act] [file …]
PARAMETERS
--no-act, -n
Do not actually do anything; just show what catalogs would be installed and where.
-ppackage, --package=package
Limit operation to the specified package (may be repeated).
-i, --indep
Operate only on architecture-independent ('indep') packages.
-a, --arch
Operate only on architecture-dependent ('arch') packages.
-Xitem, --exclude=item
Exclude files containing item from installation (may be repeated).
-A
Install any files specified even if the package does not match -p, -i, or -a.
--dbg-package=package
Install into the debug package.
file …
Install catalogs from the specified debian/<package>.xmlcatalogs-like files only.
DESCRIPTION
dh_installxmlcatalogs is a debhelper program that installs XML and SGML catalog files into the appropriate directories of Debian packages during the build process. Catalog files, which help XML parsers locate DTDs, schemas, entities, and stylesheets without hardcoded paths, are listed one per line in debian/<package>.xmlcatalogs files. Paths in these files are relative to the source package root directory.
The command copies these catalogs to multiarch-aware locations like usr/share/xml/catalog (for XML) or usr/share/sgml/catalog (for SGML) within the package build directory. It supports both XML and legacy SGML catalogs, ensuring compliance with the OASIS XML Catalog standard (TR 9401). This is crucial for packaging XML-aware software like docbook tools or libreries.
Typically invoked via dh or explicitly in debian/rules (e.g., in override_dh_install), it integrates seamlessly with other debhelper sequences. No actual system catalog updates occur during build; registration happens post-install via xml-core hooks.
CAVEATS
Installs catalogs into package directories only; global /etc/xml/catalog is updated post-install by xml-core using update-xmlcatalog. List paths in debian/<package>.xmlcatalogs relative to source root. Requires compatible debhelper version (≥5).
CONTROL FILES
Uses debian/<package>.xmlcatalogs: one catalog file path per line, relative to source dir (e.g., catalog.xml installs to usr/share/xml/catalog/catalog.xml)
USAGE EXAMPLE
In debian/rules:
override_dh_install:
dh_install --list-missing
dh_installxmlcatalogs
HISTORY
Added in debhelper 5.0.0 (2006) to standardize XML/SGML catalog installation, replacing ad-hoc methods and supporting Debian XML packaging policy.
SEE ALSO
dh_install(1), dh_installdirs(1), update-xmlcatalog(8), xmlcatalog(1)


