archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-chunked-data / repos / community-x86_64 / PKGBUILD
blobb35606fc13a4ac8df79324be35c813875a5f83d4
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=chunked-data
5 pkgname=haskell-chunked-data
6 pkgver=0.3.1
7 pkgrel=229
8 pkgdesc="Typeclasses for dealing with various chunked data representations"
9 url="https://github.com/snoyberg/mono-traversable"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-vector')
13 makedepends=('ghc')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('9bdfac0598017ac1817fff76f3ea05672624a1edbf7d0b83298002185f234134277cd6e710ae29738997abfaf1d8e900d43d5b3c1e9e7fd98557e4e7d9f647c4')
17 prepare() {
18     cd $_hkgname-$pkgver
19     sed -i '/semigroups/d' $_hkgname.cabal
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 \
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