opam-version: "2.0"
homepage:     "https://github.com/mirleft/ocaml-nocrypto"
dev-repo: "git+https://github.com/mirleft/ocaml-nocrypto.git"
bug-reports:  "https://github.com/mirleft/ocaml-nocrypto/issues"
maintainer:   "David Kaloper <david@numm.org>"
license:      "BSD-2-Clause"

patches: ["werror.patch"]
build: [
  [
    "./configure"
    "--prefix"
    prefix
    "--%{lwt:enable}%-lwt"
    "--%{mirage-xen+mirage-entropy-xen:enable}%-xen"
  ]
  [make]
  ["./configure" "--%{ounit:enable}%-tests"] {with-test}
  [make "test"] {with-test}
]
install: [ make "install" ]
remove:  [ "ocamlfind" "remove" "nocrypto" ]

depends: [
  "ocaml" {>= "4.02.0" & < "4.06.0"}
  "ocamlfind" {build}
  "oasis" {build & >= "0.4.2"}
  "ocamlbuild" {build}
  "cstruct" {>= "1.6.0" & < "3.0.0"}
  "zarith"
  "sexplib" {!= "v0.9.0" & < "v0.11.0"}
  "ppx_deriving"
  "ppx_sexp_conv" {>= "113.33.01" & < "v0.11.0"}
  ("mirage-no-xen" |
    ("mirage-xen" {>="2.2.0" & < "6.0.0"}
    & "mirage-entropy-xen" {>= "0.3.0"}
    & "zarith-xen"))
  "ounit" {with-test}
]
depopts: [
  "lwt"
]
tags: [ "org:mirage" ]
synopsis: "Small functional-style crypto library"
description: """
Ciphers: AES, 3DES, RC4.
Hashes: MD5, SHA1, SHA2.
Pubkey: RSA, DH, DSA.
Rng: Fortuna."""
authors: "David Kaloper <david@numm.org>"
flags: light-uninstall
extra-files: ["werror.patch" "md5=2e521fc478cdc76779cdd70b909555f1"]
url {
  src: "https://github.com/mirleft/ocaml-nocrypto/archive/v0.5.3.tar.gz"
  checksum: "md5=1b771555139c23da4fdf02244fc7b4a9"
}
