1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
5 pkgname=haskell-swagger2
8 pkgdesc="Swagger 2.0 data model"
9 url="https://github.com/GetShopTV/swagger2"
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')
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
38 runhaskell Setup test --show-details=direct
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