archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / dhall-json / repos / community-x86_64 / PKGBUILD
blob98b075abb9cddcc604eb3e753e49389bd80d3dc0
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=dhall-json
4 pkgver=1.7.11
5 pkgrel=70
6 pkgdesc='Convert between Dhall and JSON or YAML'
7 url='https://dhall-lang.org'
8 license=('BSD')
9 arch=('x86_64')
10 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-aeson-yaml' 'dhall'
11          'haskell-lens-family-core' 'haskell-optparse-applicative' 'haskell-prettyprinter'
12          'haskell-scientific' 'haskell-unordered-containers' 'haskell-prettyprinter-ansi-terminal')
13 makedepends=('ghc' 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-silver')
14 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('39161058a6912c4bc739489a058a0b704c9fc4ac308a6453a13202f1bedeae2d7c8de5f009f6b4758e43866018583ea4143bd06dd229002d5d5bfb7a7be94035')
17 build() {
18     cd $pkgname-$pkgver
20     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
21         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
22         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
23     runhaskell Setup build $MAKEFLAGS
24     runhaskell Setup register --gen-script
25     runhaskell Setup unregister --gen-script
26     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
27     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
30 check() {
31     cd $pkgname-$pkgver
32     # https://github.com/dhall-lang/dhall-haskell/issues/2151
33     runhaskell Setup test || echo "Tests failed"
36 package() {
37     cd $pkgname-$pkgver
38     install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
39     install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
40     runhaskell Setup copy --destdir="${pkgdir}"
41     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE