cabal-version:       >= 1.10
name:                marquise
version:             4.0.0
license-file:        LICENCE
synopsis:            Client library for Vaultaire
description:         Marquise is a collection of a library and two executables for use with Vaultaire.
                     .
                     1. A client and server library for reading/writing to the vault and spool files.
                     This provides streaming reads and writes to the vault using
                     [pipes](https://hackage.haskell.org/package/pipes) as well as writing to spool
                     files with automatic caching and rotation.
                     .
                     2. An executable `marquised`, a daemon which writes data to the vault from spool
                     files generated from users of the marquise library.
                     .
                     3. An executable `data`, used for easily inspecting data in the vault as well as
                     marquise cache files.
license:             BSD3
author:              Anchor Engineering <engineering@anchor.com.au>
maintainer:          Anchor Engineering <engineering@anchor.com.au>
copyright:           © 2013-2015 Anchor Systems, Pty Ltd and Others
category:            Other
tested-with:         GHC == 7.8.3
stability:           experimental

build-type:          Custom

source-repository    head
  type:              git
  location:          git@github.com:anchor/marquise.git


library
  hs-source-dirs:    lib
  default-language:  Haskell2010

  exposed-modules:   Marquise.Client,
                     Marquise.Classes,
                     Marquise.Types,
                     Marquise.Server

  other-modules:     Marquise.IO,
                     Marquise.IO.FFI,
                     Marquise.IO.Writer,
                     Marquise.IO.Reader,
                     Marquise.IO.Contents,
                     Marquise.IO.SpoolFile,
                     Marquise.IO.Connection,
                     Marquise.Client.Core

  build-depends:     base >=3 && <5,
                     mtl,
                     transformers,
                     monad-logger,
                     fast-logger,
                     either,
                     errors,
                     transformers-base,
                     monad-control,
                     mmorph,
                     lifted-async,
                     containers,
                     unordered-containers,
                     bytestring >= 0.10.2,
                     text,
                     attoparsec,
                     unix,
                     pipes,
                     pipes-group,
                     pipes-bytestring,
                     pipes-attoparsec >= 0.5,
                     siphash,
                     async,
                     hslogger,
                     hashable,
                     binary,
                     packer,
                     filepath,
                     directory,
                     semigroups,
                     cryptohash,
                     zeromq4-haskell,
                     time,
                     vaultaire-common >= 2.8.3

  ghc-options:       -Wall
                     -O2
                     -Wwarn
                     -fwarn-tabs

  ghc-prof-options:  -fprof-auto


executable marquised
  hs-source-dirs:    src
  main-is:           MarquiseDaemon.hs
  default-language:  Haskell2010

  build-depends:     base >=3 && <5,
                     bytestring,
                     hslogger,
                     optparse-applicative >= 0.11.0,
                     unix,
                     async,
                     containers,
                     vaultaire-common >= 2.8.3,
                     marquise

  ghc-options:       -threaded
                     -O2
                     -Wall
                     -Wwarn
                     -fwarn-tabs

  ghc-prof-options:  -fprof-auto

executable data
  hs-source-dirs:    src
  main-is:           DataProgram.hs
  default-language:  Haskell2010

  build-depends:     base >=3 && <5,
                     bytestring,
                     hslogger,
                     optparse-applicative >= 0.11.0,
                     unix,
                     pipes,
                     text,
                     attoparsec,
                     unordered-containers,
                     time,
                     old-locale,
                     data-binary-ieee754,
                     packer,
                     vaultaire-common >= 2.8.3,
                     marquise

  ghc-options:       -threaded
                     -O2
                     -Wall
                     -Wwarn
                     -fwarn-tabs

  ghc-prof-options:  -fprof-auto

test-suite           spool-test
  hs-source-dirs:    tests
  main-is:           Spool.hs
  type:              exitcode-stdio-1.0
  default-language:  Haskell2010

  build-depends:     base >=3 && <5,
                     hspec,
                     bytestring,
                     marquise

  ghc-options:       -threaded
                     -O2
                     -Wall
                     -Wwarn
                     -fwarn-tabs