archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-shakespeare / repos / community-x86_64 / PKGBUILD
blob4faf91118c94053fad125978f0d4b60975846ed9
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=shakespeare
5 pkgname=haskell-shakespeare
6 pkgver=2.1.0
7 pkgrel=2
8 pkgdesc="A toolkit for making compile-time interpolated templates"
9 url="https://www.yesodweb.com/book/shakespearean-templates"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-blaze-html' 'haskell-blaze-markup' 'haskell-file-embed'
13          'haskell-scientific' 'haskell-th-lift' 'haskell-unordered-containers' 'haskell-vector')
14 makedepends=('ghc' 'haskell-hspec' 'haskell-hunit')
15 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha512sums=('f00e3db9d4681b94296a09e6aba64b69b1866ac2371db2101d0209973102e515ea5b63b89abbb54a93b304df8fc8822a5143d800f546d9a492261a7c90e37207')
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             -f-test_roy -f-test_coffee -f-test_export
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
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