OASISFormat:      0.4
Name:             sqlite3
Version:          4.0.5
Synopsis:         sqlite3-ocaml - SQLite3 bindings
Description:      sqlite3-ocaml is an OCaml library with bindings to the
                  SQLite3 client API.  Sqlite3 is a self-contained, serverless,
                  zero-configuration, transactional SQL database engine with
                  outstanding performance for many use cases.  These bindings
                  are written in a way that enables a friendly coexistence
                  with the old (version 2) SQLite and its OCaml wrapper
                  ocaml-sqlite.
Authors:          Markus Mottl <markus.mottl@gmail.com>,
                  Christian Szegedy <csdontspam@metamatix.com>
Copyrights:       (C) 2007-2010 Jane Street Holding LLC <opensource@janestreet.com>,
                  (C) 2010-2016 Markus Mottl <markus.mottl@gmail.com>,
                  (C) 2005-2012 Christian Szegedy <csdontspam@metamatix.com>
Maintainers:      Markus Mottl <markus.mottl@gmail.com>,
                  Christian Szegedy <csdontspam@metamatix.com>
LicenseFile:      COPYING.txt
License:          LGPL-2.1+ with OCaml linking exception
OCamlVersion:     >= 3.12
FindlibVersion:   >= 1.3.1
Homepage:         http://mmottl.github.io/sqlite3-ocaml
#Categories:
#FilesAB:

Plugins:          META (0.4), StdFiles (0.4), DevFiles (0.4)
XStdFilesREADME:  false

BuildTools:       ocamldoc, ocamlbuild

Flag strict
  Description:    Strict compile-time checks
  Default:        true

Flag brewcheck
  Description:    Try to check against a homebrewed sqlite3
  Default:        false

Flag loadable_extensions
  Description:    Enable loadable extensions
  Default$:       !system(macosx)

Library sqlite3
  Path:           lib
  FindlibName:    sqlite3
  Modules:        Sqlite3
  CSources:       sqlite3_stubs.c
  CCOpt:          -g -O2 -fPIC -DPIC
  if flag(strict) && ccomp_type(cc)
    CCOpt+:       -Wall -pedantic -Wextra -Wunused -Wno-long-long -Wno-keyword-macro
  if !flag(loadable_extensions)
    CCOpt+:       -DSQLITE3_DISABLE_LOADABLE_EXTENSIONS
  CCLib:          -lsqlite3 -lpthread


# Tests

Executable test_agg
  Path:           test
  MainIs:         test_agg.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3
  CompiledObject: best

Test test_agg
  Run$:               flag(tests)
  Command:            $test_agg
  WorkingDirectory:   test

Executable test_db
  Path:           test
  MainIs:         test_db.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3
  CompiledObject: best

Test test_db
  Run$:               flag(tests)
  Command:            $test_db
  WorkingDirectory:   test

Executable test_exec
  Path:           test
  MainIs:         test_exec.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3
  CompiledObject: best

Test test_exec
  Run$:               flag(tests)
  Command:            $test_exec
  WorkingDirectory:   test

Executable test_fun
  Path:           test
  MainIs:         test_fun.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3, str
  CompiledObject: best

Test test_fun
  Run$:               flag(tests)
  Command:            $test_fun
  WorkingDirectory:   test

Executable test_stmt
  Path:           test
  MainIs:         test_stmt.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3
  CompiledObject: best

Test test_stmt
  Run$:               flag(tests)
  Command:            $test_stmt
  WorkingDirectory:   test
  PostCommand:        rm t

Executable test_error
  Path:           test
  MainIs:         test_error.ml
  Build$:         flag(tests)
  Install:        false
  BuildDepends:   sqlite3
  CompiledObject: best

Test test_error
  Run$:               flag(tests)
  Command:            $test_error
  WorkingDirectory:   test
  PostCommand:        rm t

#

Document API
  Title:                API reference for sqlite3-ocaml
  Type:                 OCamlbuild (0.4)
  InstallDir:           $docdir/api
  XOCamlbuildPath:      .
  XOCamlbuildLibraries: sqlite3

SourceRepository head
  Type:       Git
  Location:   https://github.com/mmottl/sqlite3-ocaml.git
  Browser:    https://github.com/mmottl/sqlite3-ocaml
  Tag:        v$(pkg_version)
