1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
5 pkgname=haskell-foundation
8 pkgdesc="Alternative prelude with batteries and no dependencies"
9 url="https://github.com/haskell-foundation/foundation"
12 depends=('ghc-libs' 'haskell-basement')
13 makedepends=('ghc' 'uusi' 'haskell-doctest')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('cd6b2864814780f0b07846ad4d6d6e1262ecb9edddb9e2c5137455dc39cbb2e60a9d0cd843cac6becdb801c1accbf4004be26a73e0d04071fe361b3a04034cc6')
25 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
27 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
28 -f-experimental -f-minimal-deps -f-doctest -flinktest -f-bounds-check
29 runhaskell Setup build $MAKEFLAGS
30 runhaskell Setup register --gen-script
31 runhaskell Setup unregister --gen-script
32 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
38 runhaskell Setup test --show-details=direct || echo "https://github.com/haskell-foundation/foundation/issues/560"
44 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46 runhaskell Setup copy --destdir="$pkgdir"
47 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
48 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE