Debian OCaml Packaging Policy for OCaml 3.10.2
Prev | Chapter 3. Packaging OCaml libraries | Next

# 3.4. Providing `META` files

The `ocaml-findlib` provides a tool (named `ocamlfind`) to handle OCaml libraries and store information about libraries dependencies, compiler flags, linking options, etc. Meta informations regarding a library are contained in files (usually one for each library), named `META` files, contained in the library directory. The distribution of `META` files is the best way to make more easy to use the Debian-specific oragnization of libraries. Packages distributing `META` files should suggest the use of ocamlfind, that is have a `Suggest: ocaml-findlib`.

By default, ocamlfind will look for `META` in this order:

- `/usr/lib/ocaml/3.10.2/METAS/`

- `/usr/lib/ocaml/3.10.2/package/`

The naming scheme of `META` is pretty simple.

- If the `META` file is placed in the subdirectory of the package, it should be called `META`.

- If the `META` file is placed in `/usr/lib/ocaml/3.10.2/METAS/`, it should be called `META.packagename`, where `packagename` is the name of the subdirectory where the library is stored.

For example, the `META` file for the lablgtk library is named `META` and has path `/usr/lib/ocaml/3.10.2/lablgtk/META`, where `/usr/lib/ocaml/3.10.2` is the main OCaml installation directory and `lablgtk` is the lablgtk library directory.

If upstream doesn't provide a `META`, packagers are encouraged to create one. In this case, the `META` should be sent to upstream authors, in order to have it included in the next version of the upstream source. For more information about `META` files, have a look at the Findlib manual, at the several META files provided by other packages (e.g. `lablgtk`, `pxp`, `pcre`, `netstring`, `lablgl`, ...) or ask on the debian-ocaml-maint mailing list for help.

Prev | Home | Next
Handling dependencies on OCaml | Up | Camlp4/Camlp5