desktop/haskell-http/PKGBUILD
Adrian Chaves Fernandez (Gallaecio) cac3e8d03a haskell-http: 4000.2.10
2013-12-26 10:19:58 +00:00

59 lines
2.2 KiB
Bash

# Apps Packages for Chakra, part of www.chakra-project.org
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
# Contributors: Stephen McIntosh <stephenmac7[at]gmail[dot]com>
# Thomas Dziedzic <gostrc@gmail.com>
# Vesa Kaihlavirta <vesa@archlinux.org>
# Arch Haskell Team <arch-haskell@haskell.org>
_hkgname=HTTP
pkgname=haskell-http
pkgver=4000.2.10
pkgrel=1
pkgdesc="A library for client-side HTTP"
url="http://hackage.haskell.org/package/HTTP"
license=('custom:BSD3')
arch=('x86_64' 'i686')
makedepends=()
depends=('ghc=7.6.3-1' 'haskell-array' 'haskell-base>=3' 'haskell-base<4.7' 'haskell-bytestring' 'haskell-mtl>=2.0' 'haskell-mtl<2.2' 'haskell-network<2.5' 'haskell-old-time' 'haskell-parsec')
options=('strip')
source=("http://hackage.haskell.org/packages/archive/HTTP/${pkgver}/HTTP-${pkgver}.tar.gz")
install="haskell-http.install"
sha512sums=('b3e9a52cdd8cddf7d30addfb059ee686b6196ec52572274b2113b99b3b665301e9fd8f5ea997539109ba9ab0ad7d693b64e9b8c199c437d3a4d87829b00126a7')
build() {
cd "${srcdir}/HTTP-${pkgver}"
runhaskell Setup configure \
-O \
${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } \
--enable-split-objs \
--enable-shared \
--prefix="/usr" \
--docdir="/usr/share/doc/haskell-http" \
--libsubdir='$compiler/site-local/$pkgid'
runhaskell Setup build
runhaskell Setup haddock
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd "${srcdir}/HTTP-${pkgver}"
install -D -m744 register.sh \
"${pkgdir}/usr/share/haskell/haskell-http/register.sh"
install -m744 unregister.sh \
"${pkgdir}/usr/share/haskell/haskell-http/unregister.sh"
install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
# Documentation
ln -s "/usr/share/doc/haskell-http/html" \
"${pkgdir}/usr/share/doc/ghc/html/libraries/HTTP"
# License
install -D -m644 LICENSE \
"${pkgdir}/usr/share/licenses/haskell-http/LICENSE"
rm -f "${pkgdir}/usr/share/doc/haskell-http/LICENSE"
runhaskell Setup copy --destdir="${pkgdir}"
}