# Contributor: rubicon # Maintainer: pkgname=ocaml-tls _pkgname=tls pkgver=0.15.3 pkgrel=3 pkgdesc="Transport Layer Security purely in OCaml" url="https://github.com/mirleft/ocaml-tls" arch="all !riscv64" # limited by ocaml aport license="BSD-2-Clause" depends=" ocaml-runtime ocaml-cstruct ocaml-domain-name ocaml-fmt ocaml-hkdf ocaml-ipaddr ocaml-logs ocaml-lwt ocaml-mirage-crypto ocaml-mirage-clock ocaml-mirage-flow ocaml-mirage-kv ocaml-ppx_sexp_conv ocaml-ptime ocaml-sexplib ocaml-x509 " depends_dev=" $pkgname=$pkgver-r$pkgrel ocaml-cstruct-dev ocaml-domain-name-dev ocaml-fmt-dev ocaml-hkdf-dev ocaml-ipaddr-dev ocaml-logs-dev ocaml-lwt-dev ocaml-mirage-crypto-dev ocaml-mirage-clock-dev ocaml-mirage-flow-dev ocaml-mirage-kv-dev ocaml-ppx_sexp_conv-dev ocaml-ptime-dev ocaml-sexplib-dev ocaml-x509-dev " makedepends="$depends_dev dune ocaml" checkdepends=" ocaml-alcotest-dev ocaml-cmdliner-dev ocaml-cstruct-unix-dev ocaml-ounit-dev ocaml-randomconv-dev " options="!check" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.bz2::https://github.com/mirleft/ocaml-tls/releases/download/v$pkgver/tls-$pkgver.tbz" builddir="$srcdir/$_pkgname-$pkgver" _ocamldir=usr/lib/ocaml # 32-bit archs case "$CARCH" in arm*|x86) options="$options textrels" ;; esac build() { dune build -p tls,tls-mirage --verbose } check() { dune runtest --verbose } package() { dune install \ --destdir="$pkgdir" \ --docdir=/.omit \ tls tls-mirage rm -Rf "$pkgdir"/.omit } dev() { default_dev cd "$pkgdir" local path; for path in $(find $_ocamldir \( \ -name '*.cmt' -o \ -name '*.cmti' -o \ -name '*.cmx' -o \ -name '*.cmxa' -o \ -name '*.ml' -o \ -name '*.mli' \ \)) do amove "$path" done } sha512sums=" 371b85c6afebeda0fcc8cc5252e3333d9c3ef3a6bdbee160bb194e2a5928fd537c811c6eec729f16852070944e627257d44c97142a259d00d0db66956a95df49 ocaml-tls-0.15.3.tar.bz2 "