opam-version: "2.0"
maintainer:   "thomas@gazagnaire.org"
authors:      "Thomas Gazagnaire"
license:      "ISC"
homepage:     "https://github.com/mirage/ocaml-git"
bug-reports:  "https://github.com/mirage/ocaml-git/issues"
dev-repo: "git+https://github.com/mirage/ocaml-git.git"
doc:          "https://mirage.github.io/ocaml-git/"

build: [
  [
    "ocaml"
    "pkg/pkg.ml"
    "build"
    "--pinned"
    "%{pinned}%"
    "--with-http"
    "%{cohttp:installed}%"
    "--with-unix"
    "%{conduit+cohttp+camlzip+nocrypto+base-unix:installed}%"
    "--with-mirage"
    "%{mirage-http+mirage-flow+mirage-types-lwt+channel:installed}%"
  ]
  [
    "ocaml"
    "pkg/pkg.ml"
    "build"
    "--tests"
    "true"
    "--with-http"
    "%{cohttp:installed}%"
    "--with-unix"
    "%{conduit+cohttp+camlzip+nocrypto+base-unix:installed}%"
    "--with-mirage"
    "%{mirage-http+mirage-flow+mirage-types-lwt+channel:installed}%"
  ] {with-test}
  ["ocaml" "pkg/pkg.ml" "test"] {with-test}
]
depends: [
  "ocaml" {>= "4.02.3"}
  "cmdliner" {< "1.0.0"}
  "mstruct" {>= "1.3.1"}
  "ocamlgraph"
  "uri" {>= "1.3.12"}
  "lwt" {>= "2.4.7"}
  "mtime" {< "1.0.0"}
  "logs"
  "fmt"
  "hex"
  "astring"
  "re"
  "ocplib-endian" {>= "0.6"}
  "alcotest" {with-test}
  "mirage-types-lwt" {with-test & < "3.7.0"}
  "mirage-http" {with-test}
  "mirage-flow" {with-test & < "2.0.0"}
  "channel" {with-test}
  "mirage-fs-unix" {with-test & >= "1.1.4"}
  "cohttp" {with-test}
  "conduit" {with-test}
  "base-unix" {with-test}
  "camlzip" {with-test & >= "1.06"}
  "nocrypto" {with-test}
]
depopts: [
  # --enable-mirage
  "mirage-types-lwt"
  "mirage-http"
  "mirage-flow"
  "channel"
  # --enable-unix
  "cohttp"
  "conduit"
  "base-unix"
  "camlzip"
  "nocrypto"
]
conflicts: [
 "cohttp"   {< "0.19.1"}
 "cohttp"   {>= "0.99.0"}
 "conduit" {< "0.8.4" | >= "3.0.0"}
 "conduit"  {>= "0.99"}
 "alcotest" {< "0.4.0"}
 "camlzip"  {< "1.06"}
 "nocrypto" {< "0.2.0"}
 "cmdliner" {>= "1.0.0"}
 "mirage-flow" {> "1.1.0"}
 "cstruct"  {> "3.1.1"}
]
synopsis: "Git format and protocol in pure OCaml"
description: """
Support for on-disk and in-memory Git stores. Can read and write all
the Git objects: the usual blobs, trees, commits and tags but also
the pack files, pack indexes and the index file (where the staging area
lives).

All the objects share a consistent API, and convenience functions are
provided to manipulate the different objects. For instance, it is
possible to make a pack file position independent (as the Zlib
compression might change the relative offsets between the packed
objects), to generate pack indexes from pack files, or to expand
the filesystem of a given commit.

The library comes with a command-line tool called `ogit` which shares
a similar interface with `git`, but where all operations are mapped to
the API exposed `ocaml-git` (and hence using only OCaml code).

The API documentation is available
[online](http://mirage.github.io/ocaml-git/).

[![Build Status](https://travis-ci.org/mirage/ocaml-git.png?branch=master)](https://travis-ci.org/mirage/ocaml-git)"""
url {
  src:
    "https://github.com/mirage/ocaml-git/releases/download/1.9.2/git-1.9.2.tbz"
  checksum: "md5=21f45942e044efe1b7f9f592ef7b10e0"
}
