archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-hledger-lib / trunk / PKGBUILD
bloba1a98b3e3503b77fc1d338099f69841c26c7bbe7
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 _hkgname=hledger-lib
6 pkgname=haskell-hledger-lib
7 pkgver=1.28
8 pkgrel=21
9 pkgdesc="A reusable library providing the core functionality of hledger"
10 url="http://hledger.org"
11 license=("GPL")
12 arch=('x86_64')
13 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-ansi-terminal'
14          'haskell-blaze-markup' 'haskell-call-stack' 'haskell-cassava'
15          'haskell-cassava-megaparsec' 'haskell-cmdargs' 'haskell-data-default' 'haskell-decimal'
16          'haskell-doclayout' 'haskell-extra' 'haskell-file-embed' 'haskell-glob'
17          'haskell-hashtables' 'haskell-megaparsec' 'haskell-microlens' 'haskell-microlens-th'
18          'haskell-parser-combinators' 'haskell-pretty-simple' 'haskell-regex-tdfa' 'haskell-safe'
19          'haskell-tabular' 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-timeit' 'haskell-uglymemo'
20          'haskell-unordered-containers' 'haskell-utf8-string')
21 makedepends=('ghc')
22 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
23 sha512sums=('24784233f177931bf77512ba20987a15c5c0996bd4c6b814edca3162419180381c9242d8e47258f8bf9d9b6d6167cd0e4ca1319e0b5c39f797fb433e5bcdf0cb')
25 build() {
26     cd $_hkgname-$pkgver
28     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
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 $_hkgname-$pkgver
40     runhaskell Setup test --show-details=direct
43 package() {
44     cd $_hkgname-$pkgver
46     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
47     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
48     runhaskell Setup copy --destdir="$pkgdir"
49     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE