An ocamlbuild plugin that helps packaging softwares.
Module Ocamlbuild_pkg . Pkg

A module name (case sensitive corresponding to the file's case) without extension. i.e. a/path/module, module or some/upper/case/Module.

module Lib : sig ... end
module Bin : sig ... end
type t
val create : name:string -> ?libs:Lib.t list -> ?bins:Bin.t list -> ?files:Install.dir list -> unit -> t

create ~name ?libs ?bins ?files () describes a package to be compiled and installed.

val dispatcher : t -> Ocamlbuild_plugin.hook -> unit

dispatcher pkg hook creates everything that is needed for installing your package:

  • a META file for each libs.
  • name.install to be used with opam (or opam-install). files contains additional files to be installed. And also building the package:
  • a .mllib/.mldylib file for each libs. To unable this function and to actually build the package, it is also required to call ocamlbuild with the package name as argument. For instance: ocamalbuild -use-ocamlfind -plugin-tag "package(ocamlbuild-pkg)" your-pkg-name