1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=haskell-bifunctors
9 url="https://github.com/ekmett/bifunctors/"
12 depends=('ghc-libs' 'haskell-base-orphans' 'haskell-comonad' 'haskell-tagged'
13 'haskell-th-abstraction')
15 checkdepends=('haskell-hspec' 'haskell-quickcheck')
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('59977c7eec1d1e66c99becc90c29715f90c309ab1ace8e1021d512bf58cb8781e3b3ee5e7de16735fd3cd844b4d918d5f0f6d5afbf1a4da75fa854915356192f')
22 if (( CHECKFUNC )); then
23 _opts=('--enable-tests')
25 _opts=('--disable-tests')
28 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname "${_opts[@]}" \
30 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31 -ftagged -f-semigroups
32 runhaskell Setup build $MAKEFLAGS
33 runhaskell Setup register --gen-script
34 runhaskell Setup unregister --gen-script
35 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
36 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 runhaskell Setup test --show-details=direct
47 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
48 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
49 runhaskell Setup copy --destdir="$pkgdir"
50 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
51 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE