opam-version: "2.0"
synopsis: "opam 2.0 bootstrapped binary"
description:
  "This package compiles (bootstraps) opam. For consistency and safety of the installation, the binaries are not installed into the PATH, but into lib/opam-devel, from where the user can manually install them system-wide."
maintainer: "opam-devel@lists.ocaml.org"
authors: [
  "Vincent Bernardoff <vb@luminar.eu.org>"
  "Raja Boujbel <raja.boujbel@ocamlpro.com>"
  "Roberto Di Cosmo <roberto@dicosmo.org>"
  "Thomas Gazagnaire <thomas@gazagnaire.org>"
  "Louis Gesbert <louis.gesbert@ocamlpro.com>"
  "Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>"
  "Anil Madhavapeddy <anil@recoil.org>"
  "Guillem Rieu <guillem.rieu@ocamlpro.com>"
  "Ralf Treinen <ralf.treinen@pps.jussieu.fr>"
  "Frederic Tuong <tuong@users.gforge.inria.fr>"
]
homepage: "https://opam.ocaml.org"
bug-reports: "https://github.com/ocaml/opam/issues"
depends: [
  "ocaml" {>= "4.02.3"}
  "opam-client" {= version}
  "cmdliner" {>= "0.9.8"}
  "dune" {>= "1.2.1"}
]
build: [
  ["./configure" "--disable-checks" "--prefix" prefix]
  [make "%{name}%.install"]
  [make "tests"] {with-test & os-distribution = "debian" & arch = "x86_64" & opam-version < "2.1"}
]
post-messages:
  """\
The development version of opam has been successfully compiled into %{lib}%/%{name}%. You should not run it from there, please install the binaries to your PATH, e.g. with
    sudo cp %{lib}%/%{name}%/opam /usr/local/bin

If you just want to give it a try without altering your current installation, you could use instead:
    alias opam2="OPAMROOT=~/.opam2 %{lib}%/%{name}%/opam\""""
    {success}
dev-repo: "git+https://github.com/ocaml/opam.git"
url {
  src: "https://github.com/ocaml/opam/archive/2.0.8.tar.gz"
  checksum: [
    "md5=0b798434a6275212ec58922068cde186"
    "sha512=14737dc994be2c54dfeaf2658d3713178033e1bc2b4b845a58b4bfc118bbbf12b502924add0ae32b4b2b6c1944462e5ee7143df3de362d9ee39573249d013bc9"
  ]
}
