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"
authors:      "David Kaloper <david@numm.org>"
maintainer:   "David Kaloper <david@numm.org>"
license:      "BSD-2-Clause"

build: [
  ["ocaml" "setup.ml" "-configure" "--prefix" prefix
    "--%{lwt:enable}%-lwt"
    "--%{mirage-xen+mirage-entropy-xen:enable}%-xen" ]
  ["ocaml" "setup.ml" "-build"]
]
install: ["ocaml" "setup.ml" "-install"]
remove:  ["ocamlfind" "remove" "nocrypto"]

depends: [
  "ocaml" {>= "4.01.0"}
  "ocamlfind" {build}
  "cstruct" {>= "1.4.0" & < "3.0.0"}
  "zarith" {>= "1.3"}
  "type_conv"
  "sexplib" {< "113.01.00"}
  "ctypes" {>= "0.3.3" & <= "0.5.1"}
  ("mirage-no-xen" |
    ("mirage-xen" {>="2.2.0" & < "6.0.0"}
    & "zarith-xen"
    & "mirage-entropy-xen" {>= "0.3.0"}))
  "ocamlbuild" {build}
]
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."""
flags: light-uninstall
url {
  src: "https://github.com/mirleft/ocaml-nocrypto/archive/0.4.0.tar.gz"
  checksum: "md5=6b6cc5b748f785e04d03f207b0e10d66"
}
