src/server/gf-server.cabal: compile it as a common library + executables

This commit is contained in:
hallgren
2013-12-17 15:55:14 +00:00
parent c8b8ca33c6
commit e9e919e6e3
5 changed files with 27 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
name: gf-server name: gf-server
version: 1.0 version: 1.0
cabal-version: >= 1.2 cabal-version: >= 1.8
build-type: Custom build-type: Custom
license: GPL license: GPL
license-file: ../../LICENSE license-file: ../../LICENSE
@@ -16,19 +16,13 @@ flag http
Description: Build pgf-http (deprecated, replaced by gf -server) Description: Build pgf-http (deprecated, replaced by gf -server)
Default: False Default: False
executable pgf-http Library
main-is: pgf-http.hs exposed-modules: PGFService FastCGIUtils ServeStaticFile RunHTTP
Hs-source-dirs: . transfer other-modules: Cache URLEncoding Fold
ghc-options: -threaded hs-source-dirs: . transfer
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, build-depends: base >=4.2 && <5,
old-time, time, time-compat,
directory, directory,
filepath, filepath,
containers, containers,
@@ -36,6 +30,7 @@ executable pgf-http
gf >= 3.1, gf >= 3.1,
cgi >= 3001.1.7.3, cgi >= 3001.1.7.3,
httpd-shed, httpd-shed,
mtl,
network, network,
json >= 0.3.3, json >= 0.3.3,
utf8-string >= 0.3.1.1, utf8-string >= 0.3.1.1,
@@ -46,13 +41,23 @@ executable pgf-http
ghc-options: -optl-mwindows ghc-options: -optl-mwindows
else else
build-depends: unix build-depends: unix
executable pgf-http
main-is: pgf-http.hs
Hs-source-dirs: exec
ghc-options: -threaded
if impl(ghc>=7.0)
ghc-options: -rtsopts
if flag(http)
buildable: True
build-depends: base >=4.2 && <5, gf-server, filepath, directory, cgi
else else
buildable: False buildable: False
executable pgf-service executable pgf-service
main-is: pgf-fcgi.hs main-is: pgf-fcgi.hs
Hs-source-dirs: . transfer Hs-source-dirs: exec
other-modules: PGFService FastCGIUtils Cache URLEncoding Fold
ghc-options: -threaded ghc-options: -threaded
if impl(ghc>=7.0) if impl(ghc>=7.0)
ghc-options: -rtsopts ghc-options: -rtsopts
@@ -60,22 +65,8 @@ executable pgf-service
build-depends: fastcgi >= 3001.0.2.2 build-depends: fastcgi >= 3001.0.2.2
-- Install it in Ubuntu with: apt-get install libghc-fastcgi-dev -- Install it in Ubuntu with: apt-get install libghc-fastcgi-dev
build-depends: base >=4.2 && <5, build-depends: base >=4.2 && <5, gf-server
mtl,
time,
time-compat,
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) if os(windows)
ghc-options: -optl-mwindows ghc-options: -optl-mwindows
else else
@@ -93,3 +84,4 @@ executable content-service
buildable: False buildable: False
main-is: ContentService.hs main-is: ContentService.hs
Hs-source-dirs: exec