archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-lens / repos / community-x86_64 / PKGBUILD
blob7a6f61c645b080a7bb0dd97dbdfe0e6d92e19baa
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=lens
5 pkgname=haskell-lens
6 pkgver=5.2.2
7 pkgrel=7
8 pkgdesc="Lenses, Folds and Traversals"
9 url="https://github.com/ekmett/lens/"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-assoc' 'haskell-base-orphans' 'haskell-bifunctors'
13          'haskell-call-stack' 'haskell-comonad' 'haskell-contravariant' 'haskell-distributive'
14          'haskell-free' 'haskell-hashable' 'haskell-indexed-traversable'
15          'haskell-indexed-traversable-instances' 'haskell-kan-extensions' 'haskell-parallel'
16          'haskell-profunctors' 'haskell-reflection' 'haskell-semigroupoids' 'haskell-strict'
17          'haskell-tagged' 'haskell-th-abstraction' 'haskell-these'
18          'haskell-transformers-compat' 'haskell-unordered-containers' 'haskell-vector')
19 makedepends=('ghc' 'haskell-hunit' 'haskell-quickcheck' 'haskell-simple-reflect'
20              'haskell-test-framework' 'haskell-test-framework-hunit'
21              'haskell-test-framework-quickcheck2')
22 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
23 sha512sums=('f98c0a6d86470f76d990868a8a3da8680facce982b6aaf3e5870f0e79836de664df9bc831ba7eb96765e1dde29af704d8063e5fd978f5e1726389dbc755fc494')
25 build() {
26     cd $_hkgname-$pkgver
27     
28     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31             -f-j -ftrustworthy -f-safe -ftest-templates -ftest-properties -ftest-hunit \
32             -ftest-doctests -f-dump-splices -f-old-inline-pragmas -finlining \
33             -f-benchmark-uniplate
34     runhaskell Setup build $MAKEFLAGS
35     runhaskell Setup register --gen-script
36     runhaskell Setup unregister --gen-script
37     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
38     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 check() {
42     cd $_hkgname-$pkgver
43     runhaskell Setup test --show-details=direct
46 package() {
47     cd $_hkgname-$pkgver
48     
49     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51     runhaskell Setup copy --destdir="$pkgdir"
52     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
53     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE