archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-jose / trunk / PKGBUILD
blobbd6ff42b37f1ff6481e9b5b01cf5abad4b6b7730
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=jose
5 pkgname=haskell-jose
6 pkgver=0.10
7 pkgrel=45
8 pkgdesc="JSON Object Signing and Encryption (JOSE) and JSON Web Token (JWT) library"
9 url="https://github.com/frasertweedale/hs-jose"
10 license=("Apache")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-base64-bytestring' 'haskell-concise'
13          'haskell-cryptonite' 'haskell-lens' 'haskell-memory' 'haskell-monad-time'
14          'haskell-network-uri' 'haskell-x509')
15 makedepends=('ghc' 'haskell-hedgehog' 'haskell-hspec' 'haskell-pem' 'haskell-tasty'
16              'haskell-tasty-hspec' 'haskell-tasty-hedgehog')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('fda1a9f7f856ad03e83771f490108f59629fab53a8ad9b582938ff5a766e8752b5f137348b4d2dd3744a7592268b8516a2a4789dbcc2e1a32e417bcf5c626d76')
20 build() {
21     cd $_hkgname-$pkgver
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
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     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE