1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
7 pkgdesc="Strict markdown processor for writers"
8 url="https://github.com/mmark-md/mmark"
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-case-insensitive' 'haskell-dlist'
12 'haskell-email-validate' 'haskell-foldl' 'haskell-hashable' 'haskell-html-entity-map'
13 'haskell-lucid' 'haskell-megaparsec' 'haskell-microlens' 'haskell-microlens-th'
14 'haskell-modern-uri' 'haskell-parser-combinators' 'haskell-text-metrics'
15 'haskell-unordered-containers' 'haskell-yaml')
16 makedepends=('ghc' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-megaparsec')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha256sums=('8c78a5aa7a1806c315bf8c0aa68321f04f508d72e4cac412ea401371fc7c50fd')
23 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
24 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
25 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
26 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
29 runhaskell Setup build $MAKEFLAGS
30 runhaskell Setup register --gen-script
31 runhaskell Setup unregister --gen-script
32 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
38 runhaskell Setup test --show-details=direct || echo "Tests failed with new hashable"
44 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46 runhaskell Setup copy --destdir="$pkgdir"
47 install -D -m644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
48 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md