upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-cheapskate / trunk / PKGBUILD
blobd0a0040c433f30a04886f149f5ff40e3b2a50456
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=cheapskate
5 pkgname=haskell-cheapskate
6 pkgver=0.1.1.2
7 pkgrel=544
8 pkgdesc="Experimental markdown processor."
9 url="https://github.com/jgm/cheapskate"
10 license=("BSD")
11 arch=('x86_64')
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")
15 makedepends=('ghc')
16 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
17 sha512sums=('b671ada413b8bd90f28b008c7bada4b744dedac2c7711090f1148dfa1643f7843f44e56c9a5a99fd0f71ded8393a0095b04fbdf73f70a707698dc9fb76ed1b45')
19 prepare() {
20     cd $_hkgname-$pkgver
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
28 build() {
29     cd $_hkgname-$pkgver
30     
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 \
34             -fdingus
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
42 package() {
43     cd $_hkgname-$pkgver
44     
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