opam-version: "2.0"
name:         "checkseum"
maintainer:   [ "Romain Calascibetta <romain.calascibetta@gmail.com>" ]
authors:      [ "Romain Calascibetta <romain.calascibetta@gmail.com>" ]
homepage:     "https://github.com/mirage/checkseum"
bug-reports:  "https://github.com/mirage/checkseum/issues"
dev-repo:     "git+https://github.com/mirage/checkseum.git"
doc:          "https://mirage.github.io/checkseum/"
license:      "MIT"
synopsis:     "Adler-32, CRC32 and CRC32-C implementation in C and OCaml"
description: """
Checkseum is a library to provide implementation of Adler-32, CRC32 and CRC32-C
in C and OCaml.

This library use the linking trick to choose between the C implementation
(checkseum.c) or the OCaml implementation (checkseum.ocaml). This library is on
top of optint to get the best representation of an int32. """

build: [
  [ "dune" "build" "-p" name "-j" jobs ]
  [ "%{ocaml:bin}%/ocaml" "./install/install.ml" ]
  [ "dune" "runtest" "-p" name "-j" jobs ] {with-test}
]

install: [
  [ "dune" "install" "-p" name ] {with-test}
  [ "%{ocaml:bin}%/ocaml" "./test/test_runes.ml" ] {with-test}
]

depends: [
  "ocaml"         {>= "4.07.0"}
  "dune"          {>= "2.6.0"}
  "conf-pkg-config" {build}
  "dune-configurator"
  "optint"        {>= "0.2.0"}
  "alcotest"      {with-test}
  "bos"           {with-test}
  "astring"       {with-test}
  "fmt"           {with-test}
  "fpath"         {with-test}
  "rresult"       {with-test}
  "ocamlfind"     {with-test}
]

depopts: [
  "ocaml-freestanding"
]

conflicts: [
  "mirage-xen" {< "6.0.0"}
  "ocaml-freestanding" {< "0.4.3"}
]
