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"

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.01.0"}
  "ocamlfind" {build}
  "cstruct" {>= "1.6.0" & < "3.0.0"}
  "zarith"
  "type_conv"
  "sexplib" {< "113.01.00"}
  ("mirage-no-xen" |
    ("mirage-xen" {>="2.2.0" & < "6.0.0"}
    & "mirage-entropy-xen" {>="0.3.0"}
    & "zarith-xen"))
  "ounit" {with-test}
  "ocamlbuild" {build}
]
depopts: [
  "lwt"
]

tags: [ "org:mirage" ]
patches: [ "postconf.patch" "werror.patch" ]
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: [
  ["postconf.patch" "md5=9b42fe7a62539973dc84dcb4665928ec"]
  ["werror.patch" "md5=9d31eed80a35ea4f477b21bc09453f22"]
]
url {
  src: "https://github.com/mirleft/ocaml-nocrypto/archive/0.5.2.tar.gz"
  checksum: "md5=ee523bc2e95e03f56d2dc9ff306ed114"
}
