archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-yesod-test / trunk / PKGBUILD
blob134de6c880c83dd52814dfb78b80ce76d5ad137a
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=yesod-test
4 pkgname=haskell-yesod-test
5 pkgver=1.6.15
6 pkgrel=85
7 pkgdesc="Integration testing for WAI/Yesod Applications"
8 url="https://www.yesodweb.com"
9 license=('MIT')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-hunit' 'haskell-aeson' 'haskell-attoparsec' 'haskell-blaze-builder'
12          'haskell-blaze-html' 'haskell-blaze-markup' 'haskell-case-insensitive' 'haskell-conduit'
13          'haskell-cookie' 'haskell-hspec-core' 'haskell-html-conduit' 'haskell-http-types'
14          'haskell-memory' 'haskell-network' 'haskell-pretty-show' 'haskell-wai'
15          'haskell-wai-extra' 'haskell-xml-conduit' 'haskell-xml-types' 'haskell-yesod-core')
16 makedepends=('ghc' 'haskell-yesod-form' 'haskell-hspec' 'haskell-unliftio' 'haskell-unliftio-core')
17 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
18 sha512sums=('250a68062ddacffb7e72f008545114e30485d2e14d766566b76077f7d832d472e41475af08b0f2cbbac563f44771c7ceae0dc12b5a681684af65acc9565f212e')
20 build() {
21     cd $_hkgname-$pkgver
22     
23     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
24         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
25         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
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