archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-bifunctors / trunk / PKGBUILD
blobfe964c5abe3ca6926cc5f1bd5a8c56e49d22199d
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=bifunctors
5 pkgname=haskell-bifunctors
6 pkgver=5.5.15
7 pkgrel=3
8 pkgdesc="Bifunctors"
9 url="https://github.com/ekmett/bifunctors/"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-base-orphans' 'haskell-comonad' 'haskell-tagged'
13          'haskell-th-abstraction')
14 makedepends=('ghc')
15 checkdepends=('haskell-hspec' 'haskell-quickcheck')
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('59977c7eec1d1e66c99becc90c29715f90c309ab1ace8e1021d512bf58cb8781e3b3ee5e7de16735fd3cd844b4d918d5f0f6d5afbf1a4da75fa854915356192f')
19 build() {
20     cd $_hkgname-$pkgver
22     if (( CHECKFUNC )); then
23         _opts=('--enable-tests')
24     else
25         _opts=('--disable-tests')
26     fi
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
39 check() {
40     cd $_hkgname-$pkgver
41     runhaskell Setup test --show-details=direct
44 package() {
45     cd $_hkgname-$pkgver
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