archrelease: copy trunk to community-any
[arch-community.git] / haskell-happstack-server / trunk / PKGBUILD
blob556d2ad24d33014e233f853fb622808d06f2106e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=happstack-server
4 pkgname=haskell-happstack-server
5 pkgver=7.8.0.2
6 pkgrel=7
7 pkgdesc="Web related tools and services."
8 url="http://happstack.com"
9 license=("BSD")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-base64-bytestring' 'haskell-blaze-html' 'haskell-extensible-exceptions'
12          'haskell-hslogger' 'haskell-html' 'haskell-monad-control' 'haskell-network'
13          'haskell-network-uri' 'haskell-old-locale' 'haskell-sendfile' 'haskell-syb'
14          'haskell-system-filepath' 'haskell-threads' 'haskell-transformers-base'
15          'haskell-transformers-compat' 'haskell-utf8-string' 'haskell-zlib')
16 makedepends=('ghc' 'haskell-hunit')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha256sums=('3a5653b2e2fea383eb3c3bfecbd60348a0913c682eec9c9e133b17d80b379795')
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     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
27     --ghc-option='-pie' \
28     -fnetwork-uri
30   runhaskell Setup build $MAKEFLAGS
31   runhaskell Setup register --gen-script
32   runhaskell Setup unregister --gen-script
33   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
34   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 check() {
38   cd $_hkgname-$pkgver
39   runhaskell Setup test --show-details=direct
42 package() {
43   cd $_hkgname-$pkgver
45   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47   runhaskell Setup copy --destdir="$pkgdir"
48   install -D -m644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
49   rm -f "$pkgdir"/usr/share/doc/$pkgname/COPYING