archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-cmark-gfm / repos / community-x86_64 / PKGBUILD
blobcf5fa1c8f1d4a619f895beb6950904214bacaf2a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 _hkgname=cmark-gfm
6 pkgname=haskell-cmark-gfm
7 pkgver=0.2.5
8 pkgrel=18
9 pkgdesc="Fast, accurate GitHub Flavored Markdown parser and renderer"
10 url="https://github.com/kivikakk/cmark-gfm-hs"
11 license=("BSD")
12 arch=('x86_64')
13 depends=('ghc-libs' 'cmark-gfm')
14 makedepends=('ghc' 'haskell-hunit')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('693b1581cfb93d43ce12b6273a789a2f1226e70a83e9211cb3172ca644b76ba64b14a011b618fd7334afe038c43671dc4ab32eca1f67e8b6d695b28254b50be7')
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             -fpkgconfig
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 check() {
33     cd $_hkgname-$pkgver
34     runhaskell Setup test --show-details=direct || echo "Tests failed"
37 package() {
38     cd $_hkgname-$pkgver
40     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
41     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
42     runhaskell Setup copy --destdir="$pkgdir"
43     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
44     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE