archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-wl-pprint-extras / repos / community-x86_64 / PKGBUILD
blob05b8ed58395495608d7064a0812dfd37d35729ff
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=wl-pprint-extras
4 pkgname=haskell-wl-pprint-extras
5 pkgver=3.5.0.5
6 pkgrel=375
7 pkgdesc="A free monad based on the Wadler/Leijen pretty printer"
8 url="https://github.com/ekmett/wl-pprint-extras/"
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-semigroupoids' 'haskell-utf8-string')
12 makedepends=('ghc')
13 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
14 sha512sums=('705107842ccbf4eb23d0b9e8069fd4d5bb1b03ffecbf9efaa8a579fd977380913d590fa370cc42476d5b28fde98fc44e7879fe343f761cd1751ebeb0b8c0e242')
16 prepare() {
17     cd $_hkgname-$pkgver
18     sed -e '/nats/d' -e '/semigroups/d' -e 's/< *0.6/<1/' -i $_hkgname.cabal
19     sed -i -e '/fail _ = empty/d' src/Text/PrettyPrint/Free/Internal.hs
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