ui, web, api: package.yaml: similar cleanups

This commit is contained in:
Simon Michael 2017-08-25 16:31:54 -07:00
parent 8e35bfdfc8
commit c3ba45cd48
5 changed files with 120 additions and 113 deletions

View File

@ -18,14 +18,19 @@ maintainer: Simon Michael <simon@joyful.com>
github: simonmichael/hledger github: simonmichael/hledger
homepage: http://hledger.org homepage: http://hledger.org
bug-reports: http://bugs.hledger.org bug-reports: http://bugs.hledger.org
stability: alpha
tested-with: GHC==7.10.3, GHC==8.0
extra-source-files: extra-source-files:
- CHANGES - CHANGES
- README - README
- examples/*.html - examples/*.html
data-files: data-files:
- doc/hledger-api.1 - doc/hledger-api.1
- doc/hledger-api.1.txt - doc/hledger-api.1.txt
- doc/hledger-api.1.info - doc/hledger-api.1.info
dependencies: dependencies:
- hledger-lib >= 1.3.99 && < 1.4 - hledger-lib >= 1.3.99 && < 1.4
- hledger >= 1.3.99 && < 1.4 - hledger >= 1.3.99 && < 1.4
@ -47,10 +52,9 @@ dependencies:
- wai - wai
- wai-extra - wai-extra
- warp - warp
executables: executables:
hledger-api: hledger-api:
main: hledger-api.hs main: hledger-api.hs
ghc-options: -threaded ghc-options: -threaded
cpp-options: -DVERSION="1.3.99" cpp-options: -DVERSION="1.3.99"
stability: alpha
tested-with: GHC==7.10.3, GHC==8.0

View File

@ -87,8 +87,6 @@ executable hledger-ui
build-depends: build-depends:
brick >= 0.12 && < 0.25 brick >= 0.12 && < 0.25
, vty >= 5.5 && < 5.18 , vty >= 5.5 && < 5.18
if flag(threaded)
ghc-options: -threaded
if flag(oldtime) if flag(oldtime)
build-depends: build-depends:
time < 1.5 time < 1.5
@ -96,6 +94,8 @@ executable hledger-ui
else else
build-depends: build-depends:
time >= 1.5 time >= 1.5
if flag(threaded)
ghc-options: -threaded
other-modules: other-modules:
Hledger.UI Hledger.UI
Hledger.UI.AccountsScreen Hledger.UI.AccountsScreen

View File

@ -19,13 +19,18 @@ maintainer : Simon Michael <simon@joyful.com>
github : simonmichael/hledger github : simonmichael/hledger
homepage : http://hledger.org homepage : http://hledger.org
bug-reports : http://bugs.hledger.org bug-reports : http://bugs.hledger.org
stability : stable
tested-with : GHC==7.10.3, GHC==8.0
extra-source-files: extra-source-files:
- CHANGES - CHANGES
- README - README
data-files: data-files:
- doc/hledger-ui.1 - doc/hledger-ui.1
- doc/hledger-ui.1.txt - doc/hledger-ui.1.txt
- doc/hledger-ui.1.info - doc/hledger-ui.1.info
flags: flags:
threaded: threaded:
description: Build with support for multithreaded execution description: Build with support for multithreaded execution
@ -35,18 +40,9 @@ flags:
description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
manual: false manual: false
default: false default: false
cpp-options: -DVERSION="1.3.99" cpp-options: -DVERSION="1.3.99"
executables:
hledger-ui:
source-dirs: .
main: hledger-ui.hs
ghc-options:
-Wall
-fno-warn-unused-do-bind
-fno-warn-name-shadowing
-fno-warn-missing-signatures
-fno-warn-type-defaults
-fno-warn-orphans
dependencies: dependencies:
- hledger >= 1.3.99 && < 1.4 - hledger >= 1.3.99 && < 1.4
- hledger-lib >= 1.3.99 && < 1.4 - hledger-lib >= 1.3.99 && < 1.4
@ -72,6 +68,7 @@ executables:
- text-zipper >= 0.4 && < 0.11 - text-zipper >= 0.4 && < 0.11
- transformers - transformers
- vector - vector
when: when:
# curses is required to build terminfo for vty for hledger-ui. # curses is required to build terminfo for vty for hledger-ui.
# On POSIX systems it might be not present. # On POSIX systems it might be not present.
@ -90,8 +87,6 @@ executables:
dependencies: dependencies:
- brick >= 0.12 && < 0.25 - brick >= 0.12 && < 0.25
- vty >= 5.5 && < 5.18 - vty >= 5.5 && < 5.18
- condition: flag(threaded)
ghc-options: -threaded
- condition: flag(oldtime) - condition: flag(oldtime)
then: then:
dependencies: dependencies:
@ -100,5 +95,18 @@ executables:
else: else:
dependencies: dependencies:
- time >= 1.5 - time >= 1.5
stability : stable
tested-with : GHC==7.10.3, GHC==8.0 executables:
hledger-ui:
source-dirs: .
main: hledger-ui.hs
ghc-options:
-Wall
-fno-warn-unused-do-bind
-fno-warn-name-shadowing
-fno-warn-missing-signatures
-fno-warn-type-defaults
-fno-warn-orphans
when:
- condition: flag(threaded)
ghc-options: -threaded

View File

@ -161,8 +161,11 @@ library
, json , json
, megaparsec >=5.0 && < 6.2 , megaparsec >=5.0 && < 6.2
, mtl , mtl
, parsec >=3
if (flag(dev)) || (flag(library-only)) if (flag(dev)) || (flag(library-only))
cpp-options: -DDEVELOPMENT cpp-options: -DDEVELOPMENT
if flag(dev)
ghc-options: -O0
if flag(oldtime) if flag(oldtime)
build-depends: build-depends:
time <1.5 time <1.5
@ -233,16 +236,14 @@ executable hledger-web
, yesod-form , yesod-form
, yesod-static , yesod-static
, json , json
, megaparsec >=5.0 && < 6.2
, mtl
, parsec >=3 , parsec >=3
, hledger-web , hledger-web
if flag(library-only) if (flag(dev)) || (flag(library-only))
buildable: False cpp-options: -DDEVELOPMENT
if flag(threaded)
ghc-options: -threaded
if flag(dev) if flag(dev)
ghc-options: -O0 ghc-options: -O0
if flag(dev)
cpp-options: -DDEVELOPMENT
if flag(oldtime) if flag(oldtime)
build-depends: build-depends:
time <1.5 time <1.5
@ -253,6 +254,10 @@ executable hledger-web
if impl(ghc <7.6) if impl(ghc <7.6)
build-depends: build-depends:
ghc-prim ghc-prim
if flag(library-only)
buildable: False
if flag(threaded)
ghc-options: -threaded
default-language: Haskell2010 default-language: Haskell2010
test-suite test test-suite test
@ -295,9 +300,16 @@ test-suite test
, yesod-form , yesod-form
, yesod-static , yesod-static
, json , json
, megaparsec >=5.0 && < 6.2
, mtl
, parsec >=3
, hledger-web , hledger-web
, hspec , hspec
, yesod-test , yesod-test
if (flag(dev)) || (flag(library-only))
cpp-options: -DDEVELOPMENT
if flag(dev)
ghc-options: -O0
if flag(oldtime) if flag(oldtime)
build-depends: build-depends:
time <1.5 time <1.5

View File

@ -19,6 +19,9 @@ maintainer: Simon Michael <simon@joyful.com>
github: simonmichael/hledger github: simonmichael/hledger
homepage: http://hledger.org homepage: http://hledger.org
bug-reports: http://bugs.hledger.org bug-reports: http://bugs.hledger.org
stability: stable
tested-with: GHC==7.10.3, GHC==8.0
extra-source-files: extra-source-files:
- CHANGES - CHANGES
- README - README
@ -38,10 +41,12 @@ extra-source-files:
- static/hledger.js - static/hledger.js
- static/js/*.js - static/js/*.js
- templates/*.hamlet - templates/*.hamlet
data-files: data-files:
- doc/hledger-web.1 - doc/hledger-web.1
- doc/hledger-web.1.txt - doc/hledger-web.1.txt
- doc/hledger-web.1.info - doc/hledger-web.1.info
flags: flags:
library-only: library-only:
description: Build for use with "yesod devel" description: Build for use with "yesod devel"
@ -59,6 +64,7 @@ flags:
description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal. description: If building with time < 1.5, also depend on old-locale. Set automatically by cabal.
manual: false manual: false
default: false default: false
dependencies: dependencies:
- hledger-lib >= 1.3.99 && < 1.4 - hledger-lib >= 1.3.99 && < 1.4
- hledger >= 1.3.99 && < 1.4 - hledger >= 1.3.99 && < 1.4
@ -92,6 +98,27 @@ dependencies:
- yesod-form - yesod-form
- yesod-static - yesod-static
- json - json
- megaparsec >=5.0 && < 6.2
- mtl
- parsec >=3
when:
- condition: (flag(dev)) || (flag(library-only))
cpp-options: -DDEVELOPMENT
- condition: flag(dev)
ghc-options: -O0
- condition: flag(oldtime)
then:
dependencies:
- time <1.5
- old-locale
else:
dependencies:
- time >=1.5
- condition: impl(ghc <7.6)
dependencies:
- ghc-prim
ghc-options: ghc-options:
- -Wall - -Wall
- -fno-warn-unused-do-bind - -fno-warn-unused-do-bind
@ -99,6 +126,7 @@ ghc-options:
- -fno-warn-missing-signatures - -fno-warn-missing-signatures
- -fno-warn-type-defaults - -fno-warn-type-defaults
- -fno-warn-orphans - -fno-warn-orphans
library: library:
cpp-options: -DVERSION="1.3.99" cpp-options: -DVERSION="1.3.99"
exposed-modules: exposed-modules:
@ -118,71 +146,26 @@ library:
- Settings - Settings
- Settings.Development - Settings.Development
- Settings.StaticFiles - Settings.StaticFiles
dependencies:
- megaparsec >=5.0 && < 6.2
- mtl
when:
- condition: (flag(dev)) || (flag(library-only))
cpp-options: -DDEVELOPMENT
- condition: flag(oldtime)
then:
dependencies:
- time <1.5
- old-locale
else:
dependencies:
- time >=1.5
- condition: impl(ghc <7.6)
dependencies:
- ghc-prim
executables: executables:
hledger-web: hledger-web:
main: main.hs
source-dirs: app source-dirs: app
main: main.hs
cpp-options: -DVERSION="1.3.99" cpp-options: -DVERSION="1.3.99"
dependencies: dependencies:
- parsec >=3
- hledger-web - hledger-web
when: when:
- condition: flag(library-only) - condition: flag(library-only)
buildable: false buildable: false
- condition: flag(threaded) - condition: flag(threaded)
ghc-options: -threaded ghc-options: -threaded
- condition: flag(dev)
ghc-options: -O0
- condition: flag(dev)
cpp-options: -DDEVELOPMENT
- condition: flag(oldtime)
then:
dependencies:
- time <1.5
- old-locale
else:
dependencies:
- time >=1.5
- condition: impl(ghc <7.6)
dependencies:
- ghc-prim
tests: tests:
test: test:
main: main.hs
source-dirs: tests source-dirs: tests
main: main.hs
cpp-options: -DVERSION="1.3.99" cpp-options: -DVERSION="1.3.99"
dependencies: dependencies:
- hledger-web - hledger-web
- hspec - hspec
- yesod-test - yesod-test
when:
- condition: flag(oldtime)
then:
dependencies:
- time <1.5
- old-locale
else:
dependencies:
- time >=1.5
- condition: impl(ghc <7.6)
dependencies:
- ghc-prim
stability: stable
tested-with: GHC==7.10.3, GHC==8.0