archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-skylighting-core / trunk / PKGBUILD
blob91164a01c9f6fb456a8420ba6184125ab33b8df9
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=skylighting-core
4 pkgname=haskell-skylighting-core
5 pkgver=0.13.2.1
6 pkgrel=20
7 pkgdesc="Syntax highlighting library"
8 url="https://github.com/jgm/skylighting"
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-base64-bytestring'
12          'haskell-case-insensitive' 'haskell-colour' 'haskell-safe' 'haskell-utf8-string'
13          'haskell-xml-conduit')
14 makedepends=('ghc' 'haskell-diff' 'haskell-pretty-show' 'haskell-quickcheck' 'haskell-tasty'
15              'haskell-tasty-golden' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck')
16 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
17 sha512sums=('c95d5ccc2d62f151b61402c28319100c97d6db287444f48c6e044cf513a156a784da1a2dd65043a71c188f8b8a4273f1a4b73b8ba814350fe076c2214d97ea81')
19 build() {
20     cd $_hkgname-$pkgver
21     
22     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
23         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
24         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
25             -fexecutable
26     runhaskell Setup build $MAKEFLAGS
27     runhaskell Setup register --gen-script
28     runhaskell Setup unregister --gen-script
29     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
30     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
33 check() {
34     cd $_hkgname-$pkgver
35     runhaskell Setup test --show-details=direct
38 package() {
39     cd $_hkgname-$pkgver
40     
41     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
42     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
43     runhaskell Setup copy --destdir="$pkgdir"
44     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
45     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE