name:                lmdb-bindings
version:             0.1.2.0
synopsis:            Various interfaces to LMDB databases, and a command line util.

description:         Bindings to the memory mapped b-tree key pair database that is LMDB,
                     including a transactional STM-like monad, many atomic functions, and
                     a command-line utility.

homepage:            https://github.com/JimCrayne/lmdb-bindings
license:             AGPL-3
license-file:        LICENSE
author:              James Crayne, Joseph Crayne, David Barbour, Keegan McAllister
maintainer:          jim.crayne@gmail.com
-- copyright:           
category:            Database
build-type:          Custom
-- extra-source-files:  
cabal-version:       >= 1.18

Flag hourglass
        Description: Use the 'hourglass' package for timestamps.  Disable to use 'time'.
        Default: True

Flag cryptonite
        Description: Use cryptonite package for Crypto.Random.  Disable to use 'crypto-random'
        Default: True

library
  exposed-modules:
    Database.LMDB
    Database.LMDB.BinaryUtil
    Database.LMDB.Flags
    Database.LMDB.Raw
    Database.LMDB.Raw.Types
    Database.LMDB.Macros
    Data.Global.Internal
    PackUtf8
  -- other-modules:       
  -- other-extensions:    
  build-depends:  base >=4.7 && < 5, array
                , bytestring
                , filepath
                , disk-free-space
                , monad-loops
                --, global-variables
                , hashtables
                , containers
                --, extra
                , deepseq
                , directory
                , stm
                , template-haskell
                , murmur-hash
                , binary
                , syb
  if !flag(cryptonite)
     Build-depends:  crypto-pubkey-types >= 0.4 && < 0.5
                   , crypto-pubkey >= 0.1.4 && < 0.3
                   , crypto-random
                   , cryptohash >= 0.9 && < 0.12
  else
     Build-depends:  memory, cryptonite
  if !flag(hourglass)
     cpp-options:  -DNOHOURGLASS
     Build-depends: time
  else
     Build-depends: hourglass

  build-tools: hsc2hs
  c-sources: pagesize.c
  other-extensions: DeriveDataTypeable
  default-language:    Haskell2010
  extra-libraries: lmdb

Executable check
  Default-Language: Haskell2010
  hs-source-dirs: tools
  build-depends:  lmdb-bindings
                , base
                , bytestring
                , bytestring-arbitrary
                , temporary
                , directory
                , filepath
                , process
                , binary
                , QuickCheck >= 2.4
  if !flag(cryptonite)
     Build-depends:  crypto-pubkey-types >= 0.4 && < 0.5
                   , crypto-pubkey >= 0.1.4 && < 0.3
                   , crypto-random
                   , cryptohash >= 0.9 && < 0.12
  else
     Build-depends:  memory, cryptonite
  main-is:        check.hs

Executable mdblist
  Default-Language: Haskell2010
  build-depends:  lmdb-bindings
                , base
                , bytestring
  hs-source-dirs: tools
  main-is:        mdblist.hs

Executable lmdbtool
  Default-Language: Haskell2010
  build-depends:  lmdb-bindings
                , base
                , bytestring
                , deepseq
                , process
                , binary
                , directory
  hs-source-dirs: tools
  main-is:        lmdbtool.hs


Executable test1
  Default-Language: Haskell2010
  build-depends:  lmdb-bindings
                , base
                , directory
  hs-source-dirs: tools
  main-is:        test1.hs

Executable newtbl
  Default-Language: Haskell2010
  build-depends:  lmdb-bindings
                , base
                , bytestring
                , deepseq
                , process
                , binary
  hs-source-dirs: tools
  main-is:        newtbl.hs