Name:                happstack-server
Version:             7.0.5
Synopsis:            Web related tools and services.
Description:         Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more. For in-depth documentation see the Happstack Crash Course <http://happstack.com/docs/crashcourse/index.html>
License:             BSD3
License-file:        COPYING
Author:              Happstack team, HAppS LLC
Maintainer:          Happstack team <happs@googlegroups.com>
homepage:            http://happstack.com
Category:            Web, Happstack
Build-Type:          Simple
Cabal-Version:       >= 1.8

source-repository head
    type:     darcs
    subdir:   happstack-server
    location: http://hub.darcs.net/stepcut/happstack

Flag network_2_2_3
    Description: Choose newer network library with merged in network-bytestring.
    Default: True

Flag template_haskell
    Description: Template Haskell is available on this system
    Default: True
    Manual: True

Library
  Exposed-modules:
                       Happstack.Server
                       Happstack.Server.Auth
                       Happstack.Server.Cookie
                       Happstack.Server.Compression
                       Happstack.Server.Client
                       Happstack.Server.Error
                       Happstack.Server.FileServe
                       Happstack.Server.FileServe.BuildingBlocks
                       Happstack.Server.I18N
                       Happstack.Server.Internal.Compression
                       Happstack.Server.Internal.Cookie
                       Happstack.Server.Internal.Handler
                       Happstack.Server.Internal.Types
                       Happstack.Server.Internal.Listen
                       Happstack.Server.Internal.LowLevel
                       Happstack.Server.Internal.MessageWrap
                       Happstack.Server.Internal.Multipart
                       Happstack.Server.Internal.Socket
                       Happstack.Server.Internal.TimeoutIO
                       Happstack.Server.Internal.TimeoutManager
                       Happstack.Server.Internal.TimeoutSocket
                       Happstack.Server.Internal.Monads
                       Happstack.Server.Monads
                       Happstack.Server.Proxy
                       Happstack.Server.Response
                       Happstack.Server.Routing
                       Happstack.Server.RqData
                       Happstack.Server.SURI
                       Happstack.Server.SimpleHTTP
                       Happstack.Server.Types
                       Happstack.Server.Validation
  Other-modules:
                       Happstack.Server.Internal.Clock
                       Happstack.Server.Internal.LazyLiner
                       Happstack.Server.Internal.LogFormat
                       Happstack.Server.Internal.RFC822Headers
                       Happstack.Server.Internal.SocketTH
                       Happstack.Server.SURI.ParseURI
                       Paths_happstack_server

  Build-Depends:       base >= 4 && < 5,
                       base64-bytestring == 1.0.*,
                       blaze-html        == 0.5.*,
                       bytestring,
                       containers,
                       directory,
                       extensible-exceptions,
                       filepath,
                       hslogger >= 1.0.2,
                       html,
                       monad-control >= 0.3 && < 0.4,
                       mtl >= 2 && < 2.2,
                       old-locale,
                       old-time,
                       parsec < 4,
                       process,
                       sendfile >= 0.7.1 && < 0.8,
                       system-filepath >= 0.3.1,
                       syb,
                       text >= 0.10 && < 0.12,
                       time,
                       threads >= 0.5,
                       transformers >= 0.1.3 && < 0.4,
                       transformers-base >= 0.4 && < 0.5,
                       utf8-string >= 0.3.4 && < 0.4,
                       xhtml,
                       zlib

  if flag(network_2_2_3)
    Build-Depends:     network >= 2.2.3
  else
    Build-Depends:     network < 2.2.3, network-bytestring

  if (flag(template_haskell) && !(arch(arm)))
    Build-Depends:     template-haskell
    cpp-options:       -DTEMPLATE_HASKELL

  hs-source-dirs:      src

  if !os(windows)
     Build-Depends:    unix
     cpp-options:      -DUNIX

  Extensions:          TemplateHaskell, DeriveDataTypeable, MultiParamTypeClasses,
                       TypeFamilies, FlexibleContexts, OverlappingInstances,
                       FlexibleInstances, UndecidableInstances, ScopedTypeVariables,
                       TypeSynonymInstances, PatternGuards
                       CPP, ForeignFunctionInterface
  ghc-options:         -Wall -fwarn-tabs
  GHC-Prof-Options:    -auto-all
  -- The policy is to support GHC versions no older than the GHC stable
  -- branch that was used by the latest Haskell Platform release
  -- available 18 months ago. In order to avoid people spending time
  -- keeping the build working for older versions, we tell Cabal that
  -- it shouldn't allow builds with them.
  if impl(ghc < 7.0)
    buildable: False

Test-Suite happstack-server-tests
  Type: exitcode-stdio-1.0
  Main-Is: Test.hs
  GHC-Options: -threaded
  hs-source-dirs: tests
  Build-depends: HUnit,
                 base,
                 bytestring,
                 containers,
                 happstack-server,
                 parsec < 4,
                 zlib

