1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=haskell-cheapskate
8 pkgdesc="Experimental markdown processor."
9 url="https://github.com/jgm/cheapskate"
12 depends=('ghc-libs' "haskell-aeson" "haskell-blaze-html" "haskell-data-default" "haskell-http-types"
13 "haskell-syb" "haskell-uniplate" "haskell-wai"
14 "haskell-wai-extra" "haskell-xss-sanitize")
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('b671ada413b8bd90f28b008c7bada4b744dedac2c7711090f1148dfa1643f7843f44e56c9a5a99fd0f71ded8393a0095b04fbdf73f70a707698dc9fb76ed1b45')
21 sed -e '/import Data.Aeson/a import Data.Aeson.Key' \
22 -e 's/T.pack "name"/fromText(T.pack "name")/' \
23 -e 's/T.pack "html"/fromText(T.pack "html")/' \
24 -e 's/T.pack "version"/fromText(T.pack "version")/' \
25 -i bin/cheapskate-dingus.hs
31 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
32 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
33 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
35 runhaskell Setup build $MAKEFLAGS
36 runhaskell Setup register --gen-script
37 runhaskell Setup unregister --gen-script
38 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
39 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
45 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47 runhaskell Setup copy --destdir="$pkgdir"
48 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
49 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE