DH_OCAML(1) | User Contributed Perl Documentation | DH_OCAML(1) |
dh_ocaml - calculates OCaml packages dependencies and provides
dh_ocaml [debhelper options]
[--runtime-map=dev:runtime,...]
[--nodefined-map=dev:ignore1,ignore2]
[--checksum=str]
dh_ocaml is a debhelper program that is responsible for filling the ${ocaml:Provides} and ${ocaml:Depends} substitutions and adding them to substvars files.
dh_ocaml acts on three kinds of binary packages: those shipping development part of OCaml libraries (usually named libXXX-ocaml-dev or libXXXX-camlp4-dev), those shipping runtime for OCaml libraries (e.g. plugin and shared library, usually named libXXX-ocaml or libXXXX-camlp4) and those shipping OCaml bytecode non-custom executables (i.e. executables interpreted by /usr/bin/ocamlrun).
On specific package the convention is XXX for development and XXX-base for runtime (e.g. ocaml-nox and ocaml-base-nox).
On OCaml library packages dh_ocaml will firstly look at OCaml objects shipped by the package. Then, dh_ocaml uses appropriate program on them for collecting information about OCaml modules defined and used by them. Information about defined units will be used to automatically create the OCaml md5sums registry entry for development and runtime package, e.g. /var/lib/ocaml/md5sums/libXXX-ocaml-dev.md5sums. Information about imported units will instead be used as keys in the OCaml md5sums registry for retrieving dependency information for the package. Those information will then be used to fill the ${ocaml:Depends} substvars. They will also be used to fill the ${ocaml:Provides} substvar which will be replaced by a name of the form libXXX-ocaml-dev-NNNN, where NNNN is an checksum computed from the interfaces of the modules provided by the library.
Object files (*.cm[ioax], *.cmx[as]) and executables are processed by ocamlobjinfo(1), if possible.
Dependencies extracted from the system md5sum registry, dh_ocaml will add in ${ocaml:Depends}:
For runtime package ${ocaml:Provides} will be set libXXXX-ocaml-NNNN and for development package to libXXX-ocaml-dev-NNNN.
The same kind of relations are established between libXXXX-camlp4 and libXXXX-camlp4-dev packages.
Typically, ocaml-nox/ocaml-base-nox package doesn't use a computed checksum but the version of OCaml.
This option can be repeated as much as needed to define ignore for all development packages.
Using --runtime-map you could override the pairs development package name, runtime package name. The value passed to --runtime-map admits no spaces and must be a comma separated list of items. Each item can be a single package name (stating that that name corresponds to the development part of a library) or two package names separated by a colon (stating that the first corresponds to the development part of a library, while the second to its accompanying runtime part).
Every package that doesn't follow libXXX-ocaml-dev/libXXX-ocaml, libXXXX-camlp4-dev/libXXXX-camlp4 or which is not defined in the runtime map are considered to be binary package and will be searched only for bytecode.
This file permits one to specify a file which lists, one per line, that OCaml objects or bytecode binaries. Objects should be in one of the format understandable by ocamlobjinfo(1). Files are considered relative to the package build directory.
Debian policy, version 3.7.2
OCaml packaging policy, version 1.0.0
ocamlobjinfo(1), debhelper(7), ocaml-md5sums(1)
This program is a part of debhelper.
Stefano Zacchiroli <zack@debian.org>, Samuel Mimram <smimram@debian.org>, Mehdi Dogguy <mehdi@debian.org>, Sylvain Le Gall <gildor@debian.org>, Stephane Glondu <glondu@debian.org>
2020-09-04 | perl v5.30.3 |