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"

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.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"]
synopsis: "Small functional-style crypto library"
description: """
Ciphers: AES, 3DES, RC4.
Hashes: MD5, SHA1, SHA2.
Pubkey: RSA, DH, DSA.
Rng: Fortuna."""
flags: light-uninstall
extra-files: ["werror.patch" "md5=ad8098baf5de0d9b3c66b446c8452b5d"]
url {
  src: "https://github.com/mirleft/ocaml-nocrypto/archive/0.5.0.tar.gz"
  checksum: "md5=c6288f4d8f68390f2daefd1dd00fb8bc"
}
