OCaml Debian packaging seems to be a very complex minefield.
- Debian OCaml Taskforce Homepage
- Debian OCaml Policy, web version is out of date, see
/usr/share/doc/ocaml-base-nox/ocaml_packaging_policy.html/index.html
- Manpages for binaries in the dh-ocaml package.
- Debian New Maintainers' Guide
- Distributing OCaml libraries: common problems for packager and how upstream author can help solving it
A source package XXXX may build many binary packages:
- libXXXX-ocaml-dev for the headers/library objects (always)
- libXXXX-ocaml for dynamically linked libraries (plugins) and native libraries (stublibs) (sometimes)
libXXXX-ocaml-dev MUST depend upon libXXXX-ocaml if it exists.
Not all architectures support native OCaml compilation or dynamic linking. Bytecode versions are required to be distributed with all platforms.
Native plugins are only suppored on platforms that ship with the OCaml standard library file dynlink.cmxa
.
All platforms support bytecode plugins. See the
Findlib Users Manual
for more involved details.
Filetype | Description | META file parameters | In libXXXX-ocaml | In libXXXX-ocaml-dev | .install.in Flag |
---|---|---|---|---|---|
*.cma | Bytecode archive/plugin | package(byte), plugin(byte) | If library is a plugin | Otherwise | |
*.cmxa | Native archive | package(native) | No | Yes | OPT: |
*.cmxs | Native plugin | plugin(native) | Yes, library is a plugin | No | DYN: |
*.a | No | Yes | |||
*.cmx | No | Yes | |||
*.cmi | Bytecode Interface | No | Yes | ||
*.mli | Source Inferface | No | Yes |
dh_ocamlinit
substitutes OCaml-specific variables in *.in files for their values.
Variable | Value |
---|---|
@OCamlABI@ |
`ocamlc -version` |
@OCamlStdlibDir@ |
`ocamlc -where` |
@OCamlDllDir@ |
`ocamlc -where`/stublibs |
Lines may be included/excluded from the output based upon the architecture's OCaml capabilities (native and plugin support). Lines are prefixed by a tag, which is removed if the tag is matched, else the entire line is deleted.
Line Prefix | Line Action |
---|---|
OPT: |
Deleted if ocamlopt not available |
BYTE: |
Deleted if ocamlopt is available |
DYN: |
Deleted if dynlink.cmxa is available (the system supports native plugins) |