archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-wai-middleware-static / trunk / PKGBUILD
blob532853cb56a5eae06b0bc10267781c807d5bbe48
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=wai-middleware-static
5 pkgname=haskell-wai-middleware-static
6 pkgver=0.9.2
7 pkgrel=154
8 pkgdesc="WAI middleware that serves requests to static files"
9 url="https://github.com/scotty-web/wai-middleware-static"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' 'haskell-base16-bytestring' 'haskell-cryptohash-sha1'
13          'haskell-expiring-cache-map' 'haskell-http-types' 'haskell-mime-types'
14          'haskell-old-locale' 'haskell-wai')
15 makedepends=('ghc' 'uusi' 'haskell-hspec' 'haskell-hspec-discover'
16              'haskell-hspec-expectations-lifted' 'haskell-hspec-wai' 'haskell-mockery'
17              'haskell-scotty' 'haskell-wai-extra')
18 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
19 sha512sums=('fbfb57a64b9eabce3196c97a1727a533d9dc71fdf3e3a2316e6eb5edffc26b7c7f091b0ebc9144c129d3ec6bc452ddb846ef15e898d62507b4170f5354188be8')
21 prepare() {
22     cd $_hkgname-$pkgver
23     uusi -d semigroups $_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