name:                leveldb-haskell
version:             0.3.0
synopsis:            Haskell bindings to LevelDB
homepage:            http://github.com/kim/leveldb-haskell
bug-reports:         http://github.com/kim/leveldb-haskell/issues
license:             BSD3
license-file:        LICENSE
author:              Kim Altintop et.al. (see AUTHORS file)
maintainer:          kim.altintop@gmail.com
copyright:           Copyright (c) 2012-2014 The leveldb-haskell Authors
category:            Database, FFI
stability:           Experimental
build-type:          Simple
cabal-version:       >=1.10
tested-with:         GHC == 7.2.2, GHC == 7.4.1
description:
    From <http://leveldb.googlecode.com>:
    .
    LevelDB is a fast key-value storage library written at Google that provides
    an ordered mapping from string keys to string values.
    .
    .
    This library provides a Haskell language binding to LeveldDB. It is in very
    early stage and has seen very limited testing.
    .
    Note: as of v1.3, LevelDB can be built as a shared library. Thus, as of
    v0.1.0 of this library, LevelDB is no longer bundled and must be installed
    on the target system (version 1.7 or greater is required).

extra-source-files:  Readme.md, AUTHORS, CHANGELOG examples/*.hs

source-repository head
  type:     git
  location: git://github.com/kim/leveldb-haskell.git

Flag Examples
  description:      Build examples
  default:          False
  manual:           True

library
  exposed-modules:  Database.LevelDB
                  , Database.LevelDB.Base
                  , Database.LevelDB.C
                  , Database.LevelDB.Internal
                  , Database.LevelDB.Iterator
                  , Database.LevelDB.MonadResource
                  , Database.LevelDB.Types

  default-language: Haskell2010
  other-extensions: CPP
                  , ForeignFunctionInterface
                  , EmptyDataDecls
                  , RecordWildCards

  build-depends:    base >= 3 && < 5
                  , bytestring
                  , data-default
                  , filepath
                  , resourcet > 0.3.2
                  , transformers

  ghc-options:      -Wall -rtsopts -funbox-strict-fields
  ghc-prof-options: -prof -auto-all

  hs-source-dirs:   src

  extra-libraries:  leveldb

executable leveldb-example-comparator
  main-is:          comparator.hs

  default-language: Haskell2010

  build-depends:    base >= 3 && < 5
                  , transformers
                  , data-default
                  , leveldb-haskell

  ghc-options:      -Wall -Werror -O -rtsopts
  ghc-prof-options: -prof -auto-all

  hs-source-dirs:   examples

  if flag(Examples)
    buildable:      True
  else
    buildable:      False

executable leveldb-example-features
  main-is:          features.hs

  default-language: Haskell2010

  build-depends:    base >= 3 && < 5
                  , bytestring
                  , transformers
                  , resourcet > 0.3.2
                  , data-default
                  , leveldb-haskell

  ghc-options:      -Wall -Werror -O -rtsopts
  ghc-prof-options: -prof -auto-all

  hs-source-dirs:   examples

  if flag(Examples)
    buildable:      True
  else
    buildable:      False

executable leveldb-example-filterpolicy
  main-is:          filterpolicy.hs

  default-language: Haskell2010

  build-depends:    base >= 3 && < 5
                  , transformers
                  , data-default
                  , leveldb-haskell

  ghc-options:      -Wall -Werror -O -rtsopts
  ghc-prof-options: -prof -auto-all

  hs-source-dirs:   examples

  if flag(Examples)
    buildable:      True
  else
    buildable:      False

executable leveldb-example-iterforkio
  main-is:          iterforkio.hs

  default-language: Haskell2010

  build-depends:    base >= 3 && < 5
                  , async
                  , bytestring
                  , data-default
                  , leveldb-haskell

  ghc-options:      -Wall -Werror -O -rtsopts
  ghc-prof-options: -prof -auto-all

  hs-source-dirs:   examples

  if flag(Examples)
    buildable:      True
  else
    buildable:      False