archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-foundation / trunk / PKGBUILD
blob4d85893ba1ce345b081349ab4f43221dc20762ae
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
4 _hkgname=foundation
5 pkgname=haskell-foundation
6 pkgver=0.0.29
7 pkgrel=24
8 pkgdesc="Alternative prelude with batteries and no dependencies"
9 url="https://github.com/haskell-foundation/foundation"
10 license=('BSD')
11 arch=('x86_64')
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')
17 prepare() {
18     cd $_hkgname-$pkgver
19     gen-setup
22 build() {
23     cd $_hkgname-$pkgver
24     
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
36 check() {
37     cd $_hkgname-$pkgver
38     runhaskell Setup test --show-details=direct || echo "https://github.com/haskell-foundation/foundation/issues/560"
41 package() {
42     cd $_hkgname-$pkgver
43     
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