1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=happstack-server
4 pkgname=haskell-happstack-server
7 pkgdesc="Web related tools and services."
8 url="http://happstack.com"
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')
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 \
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
39 runhaskell Setup test --show-details=direct
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