archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-dataenc / repos / community-x86_64 / PKGBUILD
blob21a76115aae1a26dde84891b34645e71d7b8549f
1 # Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
3 # Package generated by cabal2arch 0.7.5
5 _hkgname=dataenc
6 pkgname=haskell-dataenc
7 pkgver=0.14.0.7
8 pkgrel=30
9 pkgdesc="Data encoding library"
10 url="https://hackage.haskell.org/package/dataenc"
11 license=('BSD')
12 arch=('x86_64')
13 depends=('ghc-libs' 'sh')
14 makedepends=('ghc')
15 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
16 sha512sums=('82f34ad51b64b66726e45c0c2ef52c9c2be201f42c5718763158a13eb2e8f82cb0298c1580dd52788e8d7b3f1eb0e7ade4e6e69f7ba4b2f8804eb2178e719e20')
18 prepare(){
19     sed -i 's/base >= 3.0.0 && < 4.8/base >= 3.0.0/' ${_hkgname}-${pkgver}/${_hkgname}.cabal
22 build() {
23     cd $_hkgname-$pkgver
25     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26         --prefix=/usr --docdir=/usr/share/doc/$pkgname \
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
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