opam-version: "2.0"
homepage:     "https://github.com/mirleft/ocaml-tls"
dev-repo: "git+https://github.com/mirleft/ocaml-tls.git"
bug-reports:  "https://github.com/mirleft/ocaml-tls/issues"
authors:      ["David Kaloper <david@numm.org>" "Hannes Mehnert <hannes@mehnert.org>"]
maintainer:   ["Hannes Mehnert <hannes@mehnert.org>" "David Kaloper <david@numm.org>"]
license:      "BSD-2-Clause"

build: [
  [
    "./configure"
    "--prefix"
    prefix
    "--%{lwt:enable}%-lwt"
    "--%{mirage-types-lwt+ipaddr:enable}%-mirage"
  ]
  [make]
  ["./configure" "--%{ounit:enable}%-tests"] {with-test}
  [make "test"] {with-test}
]
install: [ make "install"]
remove: [ "ocamlfind" "remove" "tls" ]

depends: [
  "ocaml" {>= "4.01.0" & < "4.12.0"}
  "ocamlfind"
  "cstruct" {>= "1.6.0" & < "2.0.0"}
  "type_conv"
  "sexplib" {< "113.01.00"}
  "nocrypto" {>= "0.5.0"}
  "x509" {>= "0.4.0" & < "0.5.0"}
  "camlp4"
  "ounit" {with-test}
  "ocamlbuild" {build}
]
depopts: [
  "lwt"
  "mirage-types-lwt"
]
conflicts: [
  "lwt" {<"2.4.8"}
  "lwt" {>= "4.0.0"}
  "mirage-types-lwt" {<"2.3.0"}
  "mirage-types-lwt" {>="3.0.0"}
  "mirage-net-xen" {<"1.3.0"}
]

tags: [ "org:mirage"]
synopsis: "Transport Layer Security (TLS) in OCaml"
description: """
A clean-slate TLS implementation, with support for protocol versions 1.0-1.2.
Includes the core library, as well as Lwt and MirageOS frontends."""
flags: light-uninstall
url {
  src: "https://github.com/mirleft/ocaml-tls/archive/0.6.0.tar.gz"
  checksum: "md5=db25b519c287b6d97be46c805b9e64ce"
}
