archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-monad-control / repos / community-x86_64 / PKGBUILD
blob30a8cb36f249269e6f860af9c0f0bb35acd9a13d
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=monad-control
5 pkgname=haskell-monad-control
6 pkgver=1.0.3.1
7 pkgrel=80
8 pkgdesc="Lift control operations, like exception catching, through monad transformers"
9 url="https://github.com/basvandijk/monad-control"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-transformers-base' 'haskell-transformers-compat')
13 makedepends=('ghc' 'uusi')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('b82ac2d3b2ab1892f79bab1341c9ff17ea89b988438cfd40c246f5ffe4560cb2b77e4a1ed1aa9dc2bb64644b9d6da76eda7b40acf8cc34bb03e77b18127e93a1')
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     runhaskell Setup build $MAKEFLAGS
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 package() {
36     cd $_hkgname-$pkgver
37     
38     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
39     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
40     runhaskell Setup copy --destdir="$pkgdir"
41     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE