packages feed

gf-3.4: src/server/gf-server.cabal

name: gf-server
version: 1.0
cabal-version: >= 1.2
build-type: Custom
license: GPL
license-file: ../../LICENSE
synopsis: FastCGI Server for Grammatical Framework

flag content
  Description:
      Build content service (requires fastcgi and hsql-mysql packages)
      (In Ubuntu: apt-get install libghc-fastcgi-dev libghc-hsql-mysql-dev)
  Default:     False

flag http
  Description: Build pgf-http (deprecated, replaced by gf -server)
  Default: False

executable pgf-http
  main-is: pgf-http.hs
  Hs-source-dirs: . transfer
  ghc-options: -threaded
  if impl(ghc>=7.0)
    ghc-options: -rtsopts

  if flag(http)
    buildable: True
    other-modules: PGFService FastCGIUtils Cache URLEncoding
                   RunHTTP ServeStaticFile Fold
    build-depends: base >=4.2 && <5,
                   old-time,
                   directory,
                   filepath,
                   containers,
                   process,
                   gf >= 3.1,
                   cgi >= 3001.1.7.3,
                   httpd-shed,
                   network,
                   json >= 0.3.3,
                   utf8-string >= 0.3.1.1,
                   bytestring,
                   pretty,
                   random
    if os(windows)
      ghc-options: -optl-mwindows
    else
      build-depends: unix
  else
    buildable: False

executable pgf-service
  main-is: pgf-fcgi.hs
  Hs-source-dirs: . transfer
  other-modules: PGFService FastCGIUtils Cache URLEncoding Fold
  ghc-options: -threaded
  if impl(ghc>=7.0)
    ghc-options: -rtsopts

  build-depends: fastcgi >= 3001.0.2.2
       -- Install it in Ubuntu with: apt-get install libghc-fastcgi-dev

  build-depends: base >=4.2 && <5,
                 mtl,
                 old-time,
                 directory,
                 filepath,
                 containers,
                 process,
                 gf >= 3.1,
                 cgi >= 3001.1.7.3,
                 network,
                 json >= 0.3.3,
                 utf8-string >= 0.3.1.1,
                 bytestring,
                 pretty,
                 random
  if os(windows)
    ghc-options: -optl-mwindows
  else
    build-depends: unix

executable content-service
  if flag(content)
    build-depends: base >=4.2 && <5, old-locale,
                   fastcgi >= 3001.0.2.2,
                       -- In Ubuntu: apt-get install libghc-fastcgi-dev
                   hsql-mysql, hsql
                       -- In Ubuntu: apt-get install libghc-hsql-mysql-dev
    buildable: True
  else
    buildable: False

  main-is: ContentService.hs