archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-swagger2 / trunk / PKGBUILD
blob2ab5ca63f5e274191a65cd3480547708919f6cfa
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=swagger2
5 pkgname=haskell-swagger2
6 pkgver=2.8.6
7 pkgrel=40
8 pkgdesc="Swagger 2.0 data model"
9 url="https://github.com/GetShopTV/swagger2"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-base-compat-batteries'
13          'haskell-cookie' 'haskell-hashable' 'haskell-generics-sop' 'haskell-http-media'
14          'haskell-insert-ordered-containers' 'haskell-lens' 'haskell-network' 'haskell-optics-core'
15          'haskell-optics-th' 'haskell-quickcheck' 'haskell-scientific'
16          'haskell-unordered-containers' 'haskell-vector' 'haskell-uuid-types')
17 makedepends=('ghc' 'haskell-hspec' 'haskell-hunit' 'haskell-quickcheck-instances'
18              'haskell-hspec-discover' 'haskell-doctest' 'haskell-cabal-doctest' 'haskell-glob'
19              'haskell-utf8-string')
20 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
21 sha512sums=('34fd648d329a9cd60d32b5eadb19bf254dcde8772474c97c58a719fe591d92b160680a7ba0c9527d1627f708dc29e372fcd176fac61f874c419808e0e97decdc')
23 build() {
24     cd $_hkgname-$pkgver
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
29     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 check() {
37     cd $_hkgname-$pkgver
38     runhaskell Setup test --show-details=direct
41 package() {
42     cd $_hkgname-$pkgver
44     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46     runhaskell Setup copy --destdir="$pkgdir"
47     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
48     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE