opam-version: "2.0"
maintainer: "Spiros Eliopoulos <spiros@inhabitedtype.com>"
homepage: "https://github.com/inhabitedtype/ocaml-webmachine"
dev-repo: "git+https://github.com/inhabitedtype/ocaml-webmachine.git"
bug-reports: "https://github.com/inhabitedtype/ocaml-webmachine/issues"
authors: ["Inhabited Type LLC"]
license: "BSD-3-Clause"

build: [
  ["./configure" "--prefix=%{prefix}%"]
  [make]
  ["./configure" "--enable-tests"] {with-test}
  [make] {with-test}
  [make "test"] {with-test}
  [make "doc"] {with-doc}
]
install: [
  [make "install"]
]
remove: [
  ["ocamlfind" "remove" "webmachine"]
]
depends: [
  "ocaml" {>= "4.01"}
  "cohttp" {>= "0.12.0" & < "0.21.0"}
  "ocamlfind" {build}
  "ounit" {with-test & >= "1.0.2"}
  "re" {>= "1.3.0"}
  "ocamlbuild" {build}
]
synopsis: "A REST toolkit for OCaml"
description: """
ocaml-webmachine is a layer on top of cohttp that implements a
state-machine-based HTTP request processor. It's particularly well-suited for
writing RESTful APIs. As the name suggests, this is an OCaml port of the
webmachine project."""
flags: light-uninstall
url {
  src:
    "https://github.com/inhabitedtype/ocaml-webmachine/archive/0.1.2.tar.gz"
  checksum: "md5=f806af6419ed826f71e218e2d0592d23"
}
