opam-version: "2.0"
maintainer: "dave@recoil.org"
authors: [ "Jonathan Ludlam" "David Scott" ]
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
homepage: "https://github.com/xapi-project/nbd"
dev-repo: "git+https://github.com/xapi-project/nbd.git"
bug-reports: "https://github.com/xapi-project/nbd/issues"

build: [
  ["oasis" "setup"]
  ["./configure" "--prefix" prefix]
  [make]
  ["./configure" "--enable-tests"] {with-test & ocaml:version < "4.06.0"}
  [make "test"] {with-test & ocaml:version < "4.06.0"}
]
install: [
  [make "install" "BINDIR=%{bin}%"]
]
remove: [
  [make "uninstall" "BINDIR=%{bin}%"]
  ["ocamlfind" "remove" "nbd"]
]
depends: [
  "ocaml" {>= "4.03.0"}
  "oasis" {build}
  "ounit" {with-test}
  "ocamlfind" {build}
  "ppx_tools"
  "lwt" {< "5.0.0"}
  "result"
  "rresult"
  "cstruct" {>= "1.9.0" & < "3.4.0"}
  "ppx_cstruct" {< "3.4.0"}
  "cmdliner"
  "sexplib" {< "v0.15"}
  "mirage-types-lwt" {>= "3.0.0" & < "3.7.0"}
  "mirage-block-unix"
  "mirage-block-lwt"
  "io-page-unix"
  "mirage" {>= "1.1.0"}
  "uri"
  "ppx_deriving"
  "ppx_sexp_conv" {!= "113.33.00+4.03" & < "v0.15"}
]
tags: [ "org:mirage" "org:xapi-project" ]
synopsis: "Network Block Device (NBD) protocol implementation"
description: """
This library allows applications to export and consume block
devices using the NBD protocol (as used by Linux, qemu etc)"""
url {
  src: "https://github.com/xapi-project/nbd/archive/v3.0.0.tar.gz"
  checksum: "md5=03b42229af1f555b927092c7d6e31f6d"
}
