opam-version: "2.0"
maintainer: "Markus Mottl <markus.mottl@gmail.com>"
authors: [ "Alain Frisch <alain.frisch@lexifi.com>"
           "Markus Mottl <markus.mottl@gmail.com>"
           "Petter Urkedal <paurkedal@gmail.com>" ]
license: "LGPL-2.1-or-later with OCaml-LGPL-linking-exception"
homepage: "http://mmottl.github.io/postgresql-ocaml"
dev-repo: "git+https://github.com/mmottl/postgresql-ocaml.git"
bug-reports: "https://github.com/mmottl/postgresql-ocaml/issues"
tags: [ "clib:pq"  ]
build: [
  [
    "ocaml"
    "setup.ml"
    "-configure"
    "--prefix"
    prefix
    "--%{lablgtk:enable}%-lablgtk2"
  ]
  ["ocaml" "setup.ml" "-build"]
  [
    "ocaml"
    "setup.ml"
    "-configure"
    "--enable-tests"
    "--%{lablgtk:enable}%-lablgtk2"
  ] {with-test}
  ["ocaml" "setup.ml" "-build"] {with-test}
  ["ocaml" "setup.ml" "-test"] {with-test}
  ["ocaml" "setup.ml" "-doc"] {with-doc}
]
install: ["ocaml" "setup.ml" "-install"]
remove: [
  ["ocamlfind" "remove" "postgresql"]
]
depends: [
  "ocaml" {>= "3.12"}
  "base-bigarray"
  "base-bytes"
  "base-threads"
  "ocamlfind" {build & >= "1.5"}
  "ocamlbuild" {build}
]
conflicts: [
  "lablgtk" {>="2.16.0"}
]
depopts: [
  "lablgtk" {build}
]
depexts: [
  ["libpq-dev"] {os-family = "debian"}
  ["postgresql-devel"] {os-distribution = "fedora"}
  ["postgresql-libs"] {os-distribution = "arch"}
  ["postgresql-dev"] {os-distribution = "alpine"}
  ["postgresql-devel"] {os-distribution = "centos"}
  ["postgresql"] {os-distribution = "gentoo"}
  ["postgresql-devel"] {os-family = "suse"}
]
synopsis: "Bindings to the PostgreSQL library"
description: """
postgresql-ocaml offers library functions for accessing PostgreSQL
databases"""
flags: light-uninstall
url {
  src:
    "https://github.com/mmottl/postgresql-ocaml/releases/download/v4.0.0/postgresql-ocaml-4.0.0.tar.gz"
  checksum: "md5=c981eac6ab54105644aa41c1fa0f5bd7"
}
