Module Topkg_opam.Install

opam install file.

A module to generate opam install files.

Reference. Syntax and semantics of opam install files.

opam install files

type field = [
| `Bin
| `Doc
| `Etc
| `Lib
| `Lib_root
| `Libexec
| `Libexec_root
| `Man
| `Misc
| `Sbin
| `Share
| `Share_root
| `Stublibs
| `Toplevel
| `Unknown of string

The type for opam install file fields.

type move

The type for file moves.

val move : ?maybe:bool -> ?dst:Topkg_fpath.t -> Topkg_fpath.t -> move

move ~maybe ~dst src moves src to dst, where dst is a path relative to the directory corresponding to the field. If maybe is true (defaults to false), then src may not exist, otherwise an install error will occur if the file doesn't exist.

type t = [ `Header of string option ] * (field * move) list

The type for opam install files. An optional starting header comment and a list of field moves.

val to_string : t -> string

to_string t is t as syntactically valid opam install file.