upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-servant-swagger / trunk / PKGBUILD
blob214941e67955e0fe99319db2ceabc53bc1cf1a8b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=servant-swagger
5 pkgname=haskell-servant-swagger
6 pkgver=1.1.11
7 pkgrel=90
8 pkgdesc="Generate Swagger specification for your servant API"
9 url="https://github.com/haskell-servant/servant/tree/master/servant-swagger"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-http-media'
13          'haskell-insert-ordered-containers' 'haskell-lens' 'haskell-servant'
14          'haskell-singleton-bool' 'haskell-swagger2' 'haskell-unordered-containers'
15          'haskell-hspec' 'haskell-quickcheck')
16 makedepends=('ghc' 'uusi' 'haskell-base-compat' 'haskell-cabal-doctest' 'haskell-doctest'
17              'haskell-hspec-discover' 'haskell-lens-aeson' 'haskell-utf8-string' 'haskell-vector')
18 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
19 sha512sums=('1813145fe82cfbdb8cb9101810fb114d420e480eaa3ac5ecd8619a58663fb72443da6ca59ff5c9011f3baa11506ba3d4d40330cbad637946c4814f839064362e')
21 prepare() {
22     cd $_hkgname-$pkgver
23     uusi -u hspec $_hkgname.cabal
26 build() {
27     cd $_hkgname-$pkgver
29     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
30         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
31         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
32     runhaskell Setup build $MAKEFLAGS
33     runhaskell Setup register --gen-script
34     runhaskell Setup unregister --gen-script
35     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
36     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
39 check() {
40     cd $_hkgname-$pkgver
41     runhaskell Setup test --show-details=direct
44 package() {
45     cd $_hkgname-$pkgver
47     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
48     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
49     runhaskell Setup copy --destdir="$pkgdir"
50     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
51     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE