opam-version: "2.0"
maintainer: "Gabriel Scherer <gabriel.scherer@gmail.com>"
authors: ["Nicolas Pouillard" "Berke Durak"]
homepage: "https://github.com/ocaml/ocamlbuild/"
bug-reports: "https://github.com/ocaml/ocamlbuild/issues"
license: "LGPL-2.0-or-later WITH OCaml-LGPL-linking-exception"
doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc"
dev-repo: "git+https://github.com/ocaml/ocamlbuild.git"
synopsis:
  "OCamlbuild is a build system with builtin rules to easily build most OCaml projects"

build: [
  [
    make
    "-f"
    "configure.make"
    "all"
    "OCAMLBUILD_PREFIX=%{prefix}%"
    "OCAMLBUILD_BINDIR=%{bin}%"
    "OCAMLBUILD_LIBDIR=%{lib}%"
    "OCAMLBUILD_MANDIR=%{man}%"
    "OCAML_NATIVE=%{ocaml:native}%"
    "OCAML_NATIVE_TOOLS=%{ocaml:native}%"
  ]
  [make "check-if-preinstalled" "all" "opam-install"]
]

conflicts: [
  "base-ocamlbuild"
  "ocamlfind" {< "1.6.2"}
]

depends: [
  "ocaml" {>= "4.08"}
  "ocamlfind" {with-test}
  "menhirLib" {with-test}
]

url {
  src: "https://github.com/ocaml/ocamlbuild/archive/refs/tags/0.15.0.tar.gz"
  checksum: [
    "sha512=c8311a9a78491bf759eb27153d6ba4692d27cd935759a145f96a8ba8f3c2e97cef54e7d654ed1c2c07c74f60482a4fef5224e26d0f04450e69cdcb9418c762d3"
  ]
}
