hledger/hledger-web/hledger-web.cabal
Simon Michael f03b020e2f set version with CPP instead of cabal-file-th; make building more robust
hledger and hledger-web were reading their version number (and program
name) from their cabal files at compile time using cabal-file-th,
which allowed the version number be maintained in one place (per
package).

This meant you had to be in same directory as the cabal file when
building, which made life more complicated, eg emacs compilation mode
could not jump to errors. Also, it slowed down building slightly, and
is a factor in hledger Debian packages being unavailable on a number
of platforms (we also use TH for report templates).

Now, the build version is set with a CPP VERSION flag, which seems
simpler overall. For cabal builds, this needs to be configured
manually in a few more places in each cabal file. For makefile builds,
it is set it to the name of the most recent darcs tag (which should be
more useful than the old behaviour). If not set, it defaults to the
blank string, useful eg for haddock. And, all makefile builds now run
from the top directory.
2012-10-13 19:21:17 +00:00

173 lines
5.4 KiB
Plaintext

name: hledger-web
-- also in cpp-options below
version: 0.18.2
category: Finance
synopsis: A web interface for the hledger accounting tool.
description:
hledger is a library and set of user tools for working
with financial data (or anything that can be tracked in a
double-entry accounting ledger.) It is a haskell port and
friendly fork of John Wiegley's Ledger. hledger provides
command-line, curses and web interfaces, and aims to be a
reliable, practical tool for daily use.
license: GPL
license-file: LICENSE
author: Simon Michael <simon@joyful.com>
maintainer: Simon Michael <simon@joyful.com>
homepage: http://hledger.org
bug-reports: http://code.google.com/p/hledger/issues
stability: beta
tested-with: GHC==7.0, GHC==7.2, GHC==7.4.1
cabal-version: >= 1.6
build-type: Simple
extra-tmp-files:
extra-source-files:
models
routes
static/style.css
static/hledger.js
static/jquery.js
static/jquery.url.js
static/jquery.flot.js
static/dhtmlxcommon.js
static/dhtmlxcombo.js
static/excanvas.min.js
static/combo_select.gif
static/favicon.ico
source-repository head
type: darcs
location: http://joyful.com/repos/hledger
-- Flag production
-- Description: Build fully optimised and with web files embedded (not loaded from ./static/)
-- Default: True
flag threaded
Description: Build with support for multithreaded execution.
Default: True
flag blaze_html_0_5
description: Use the newer 0.5 version of blaze-html and blaze-markup.
default: False
flag dev
Description: Turn on development settings, like auto-reload templates.
Default: False
flag library-only
Description: Build for use with "yesod devel"
Default: False
library
if flag(library-only)
Buildable: True
else
Buildable: False
exposed-modules:
Hledger.Web.Application
other-modules:
Hledger.Web
Hledger.Web.Foundation
Hledger.Web.Import
Hledger.Web.Options
Hledger.Web.Settings
Hledger.Web.Settings.StaticFiles
Hledger.Web.Handlers
ghc-options: -Wall -O0 -fno-warn-unused-do-bind
cpp-options: -DVERSION="0.18.2" -DDEVELOPMENT
extensions: TemplateHaskell
QuasiQuotes
OverloadedStrings
NoImplicitPrelude
CPP
OverloadedStrings
MultiParamTypeClasses
TypeFamilies
executable hledger-web
if flag(library-only)
Buildable: False
if flag(dev)
cpp-options: -DVERSION="0.18.2" -DDEVELOPMENT
ghc-options: -Wall -O0 -fno-warn-unused-do-bind
else
ghc-options: -Wall -O2 -fno-warn-unused-do-bind
if flag(threaded)
ghc-options: -threaded
extensions: TemplateHaskell
QuasiQuotes
OverloadedStrings
NoImplicitPrelude
CPP
OverloadedStrings
MultiParamTypeClasses
TypeFamilies
main-is: hledger-web.hs
other-modules:
Hledger.Web
Hledger.Web.Foundation
Hledger.Web.Application
Hledger.Web.Import
Hledger.Web.Options
Hledger.Web.Settings
Hledger.Web.Settings.StaticFiles
Hledger.Web.Handlers
build-depends:
hledger == 0.18.2
, hledger-lib == 0.18.2
, base >= 4.3 && < 5
, cmdargs >= 0.10 && < 0.11
, directory
, filepath
, HUnit
, io-storage >= 0.3 && < 0.4
, old-locale
, parsec
, regexpr >= 0.5.1
, safe >= 0.2
, time
, yesod == 1.0.*
, yesod-core
, yesod-default
, yesod-static
, clientsession
, hamlet
, network-conduit
, shakespeare-text
, template-haskell
, text >= 0.11 && < 0.12
, transformers >= 0.2 && < 0.4
, wai
, wai-extra
, warp
, yaml
if flag(blaze_html_0_5)
cpp-options: -DBLAZE_HTML_0_5
build-depends:
blaze-html >= 0.5 && < 0.6
, blaze-markup >= 0.5.1 && < 0.6
else
build-depends:
blaze-html >= 0.4 && < 0.5
-- if flag(production)
-- cpp-options: -DPRODUCTION
-- ghc-options: -O2
-- else
-- ghc-options: -Wall
-- if flag(threaded)
-- ghc-options: -threaded