archrelease: copy trunk to community-any
[arch-community.git] / hledger-web / repos / community-x86_64 / PKGBUILD
blobd0eb58f16ab8599731e27ab0b2dfb99095819343
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 pkgname=hledger-web
5 pkgver=1.28
6 pkgrel=49
7 pkgdesc="Web-based user interface for the hledger accounting system"
8 url="http://hledger.org"
9 license=("GPL")
10 arch=('x86_64')
11 depends=('ghc-libs' 'hledger' 'haskell-hledger-lib' 'haskell-aeson' 'haskell-base64'
12          'haskell-blaze-html' 'haskell-blaze-markup' 'haskell-case-insensitive'
13          'haskell-clientsession' 'haskell-cmdargs' 'haskell-conduit' 'haskell-conduit-extra'
14          'haskell-data-default' 'haskell-decimal' 'haskell-extra' 'haskell-hjsmin'
15          'haskell-hspec' 'haskell-http-conduit' 'haskell-http-client' 'haskell-http-types'
16          'haskell-megaparsec' 'haskell-network' 'haskell-shakespeare' 'haskell-unix-compat'
17          'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-wai' 'haskell-wai-cors'
18          'haskell-wai-extra' 'haskell-wai-handler-launch' 'haskell-warp' 'haskell-yesod'
19          'haskell-yesod-core' 'haskell-yesod-form' 'haskell-yesod-static' 'haskell-yesod-test')
20 makedepends=('ghc')
21 replaces=('hledger-api')
22 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
23 sha512sums=('2612b828e437413a0ea6542ade40696abb122545ee7db24c44a26923536d56ccaecac7d07e4472b5aa8a0526e3f1cdcfe7052fc43983ccf7c228a7d3eb962a15')
25 build() {
26     cd $pkgname-$pkgver
27     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
28         --prefix=/usr --docdir="/usr/share/doc/$pkgname" --datasubdir=$pkgname --enable-tests \
29         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
30             -f-dev -f-library-only -fthreaded
31     runhaskell Setup build $MAKEFLAGS
32     runhaskell Setup register --gen-script
33     runhaskell Setup unregister --gen-script
34     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
35     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
38 check() {
39     cd $pkgname-$pkgver
40     runhaskell Setup test --show-details=direct
43 package() {
44     cd $pkgname-$pkgver
45     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47     runhaskell Setup copy --destdir="$pkgdir"
48     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
50     install -Dm644 hledger-web.1 -t "$pkgdir"/usr/share/man/man1/