archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-resource-pool / trunk / PKGBUILD
blob8c15657a6bb20e572df022dce6f16388493f3aec
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=resource-pool
5 pkgname=haskell-resource-pool
6 pkgver=0.2.3.2
7 pkgrel=274
8 pkgdesc="A high-performance striped resource pooling implementation"
9 url="https://github.com/bos/pool"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' "haskell-hashable" "haskell-monad-control"
13          "haskell-transformers-base" "haskell-vector")
14 makedepends=('ghc')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('42b0bb6dea35c08884f65604acc0dd93707b8d4de780c584877e92fbfe534d4f754282e9c9f7257c203f1152d85ac8170f84ee9a95573343d02a774006c4118b')
18 build() {
19     cd $_hkgname-$pkgver
20     
21     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
22         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
23         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
24             -f-developer
25     runhaskell Setup build $MAKEFLAGS
26     runhaskell Setup register --gen-script
27     runhaskell Setup unregister --gen-script
28     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
29     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
32 package() {
33     cd $_hkgname-$pkgver
34     
35     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
36     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
37     runhaskell Setup copy --destdir="$pkgdir"
38     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
39     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE