upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-megaparsec / repos / community-x86_64 / PKGBUILD
blob8abc7317add69ee99c92b8502be926ecd56123cf
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=megaparsec
5 pkgname=haskell-megaparsec
6 pkgver=9.3.0
7 pkgrel=11
8 pkgdesc="Monadic parser combinators"
9 url="https://github.com/mrkkrp/megaparsec"
10 license=("custom:BSD2")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-case-insensitive' 'haskell-parser-combinators'
13          'haskell-scientific')
14 makedepends=('ghc')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('7ce947e142eeb028e29f7b3f007ca5fed7d170c7831e1fc55b4522fa1927ce2f41c2cdeb72ac63058a50b4b135f45939d947eae5d1abbbf93a2adf25487ca7cb')
18 build() {
19     cd $_hkgname-$pkgver
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 \
24             -f-dev
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
32 package() {
33     cd $_hkgname-$pkgver
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