1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=haskell-megaparsec
8 pkgdesc="Monadic parser combinators"
9 url="https://github.com/mrkkrp/megaparsec"
10 license=("custom:BSD2")
12 depends=('ghc-libs' 'haskell-case-insensitive' 'haskell-parser-combinators'
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('7ce947e142eeb028e29f7b3f007ca5fed7d170c7831e1fc55b4522fa1927ce2f41c2cdeb72ac63058a50b4b135f45939d947eae5d1abbbf93a2adf25487ca7cb')
21 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
22 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
23 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
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
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.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
39 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md