opam-version: "2.0"
maintainer: "coqdev@inria.fr"
authors: "The Coq development team, INRIA, CNRS, University Paris Sud, University Paris 7, Ecole Polytechnique."
homepage: "https://coq.inria.fr/"
bug-reports: "https://github.com/coq/coq/issues"
dev-repo: "git+https://github.com/coq/coq.git"
license: "LGPL-2.1"

depends: [
  "ocaml" {>= "4.02.3" & < "4.10"}
  "ocamlfind" {build}
  "camlp5" {< "8"}
  "num"
  "conf-findutils" {build}
]
depopts: [
  "coq-native"
]
build: [
  [
    "./configure"
    "-configdir" "%{lib}%/coq/config"
    "-prefix" prefix
    "-mandir" man
    "-docdir" doc
    "-libdir" "%{lib}%/coq"
    "-datadir" "%{share}%/coq"
    "-camlp5dir" "%{camlp5:lib}%"
    "-coqide" "no"
    "-native-compiler" "yes" {coq-native:installed} "no" {!coq-native:installed}
  ]
  [make "-j%{jobs}%"]
  [make "-j%{jobs}%" "byte"]
]
install: [
  [make "install"]
  [make "install-byte"]
]
remove: [
  ["rm" "-rf" "%{lib}%/coq" "%{share}%/coq"]
  ["rm" "-f"
  "%{man}%/man1/coqc.1"
  "%{man}%/man1/coqchk.1"
  "%{man}%/man1/coqdep.1"
  "%{man}%/man1/coqdoc.1"
  "%{man}%/man1/coqide.1"
  "%{man}%/man1/coq_makefile.1"
  "%{man}%/man1/coqmktop.1"
  "%{man}%/man1/coq-tex.1"
  "%{man}%/man1/coqtop.1"
  "%{man}%/man1/coqtop.byte.1"
  "%{man}%/man1/coqtop.opt.1"
  "%{man}%/man1/coqwc.1"
  "%{man}%/man1/gallina.1"
  "%{share}%/texmf/tex/latex/misc/coqdoc.sty"
  "%{share}%/emacs/site-lisp/coq-font-lock.el"
  "%{share}%/emacs/site-lisp/coq-inferior.el"
  "%{share}%/emacs/site-lisp/gallina-db.el"
  "%{share}%/emacs/site-lisp/gallina.el"
  "%{share}%/emacs/site-lisp/gallina-syntax.el"
  ]
]
synopsis: "Formal proof management system"
flags: light-uninstall
extra-files: ["coq.install" "md5=6e8ff2905b5508b143a8acb16e3b5150"]
url {
  src: "https://github.com/coq/coq/archive/V8.8.2.tar.gz"
  checksum: "md5=5d693cd1953a0dd74920b43d183bc26c"
}
