desktop/haskell-http/PKGBUILD

63 lines
2.0 KiB
Bash
Raw Normal View History

2014-04-18 07:14:34 +08:00
# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
2013-12-26 17:57:37 +08:00
# Contributors: Stephen McIntosh <stephenmac7[at]gmail[dot]com>
2014-04-18 07:14:34 +08:00
# H W Tovetjärn (totte) <totte@tott.es>
2013-12-26 17:57:37 +08:00
# Thomas Dziedzic <gostrc@gmail.com>
# Vesa Kaihlavirta <vesa@archlinux.org>
# Arch Haskell Team <arch-haskell@haskell.org>
2014-04-18 07:14:34 +08:00
## NOTE: when you update Haskell packages you'll have to update the entire stack to not break it ##
2012-06-17 11:29:48 +08:00
_hkgname=HTTP
pkgname=haskell-http
pkgver=4000.3.3
2013-12-26 18:19:58 +08:00
pkgrel=1
2012-06-17 11:29:48 +08:00
pkgdesc="A library for client-side HTTP"
2013-12-26 17:57:37 +08:00
url="http://hackage.haskell.org/package/HTTP"
2012-06-17 11:29:48 +08:00
license=('custom:BSD3')
2014-04-18 07:14:34 +08:00
arch=('x86_64')
depends=('ghc' 'haskell-mtl>=2.0' 'haskell-mtl<2.3' 'haskell-network<2.7' 'haskell-parsec'
'haskell-network-uri')
2014-04-18 07:14:34 +08:00
options=('strip' 'staticlibs')
2013-12-26 18:19:58 +08:00
source=("http://hackage.haskell.org/packages/archive/HTTP/${pkgver}/HTTP-${pkgver}.tar.gz")
md5sums=('3f2d84d59e36476ca02c882419632d7d')
2013-12-26 17:57:37 +08:00
2012-06-17 11:29:48 +08:00
build() {
2013-12-26 18:19:58 +08:00
cd "${srcdir}/HTTP-${pkgver}"
runhaskell Setup configure -O \
--enable-library-profiling \
--enable-shared \
--prefix=/usr \
--docdir=/usr/share/doc/${pkgname} \
--libsubdir=\$compiler/site-local/\$pkgid
2012-06-17 11:29:48 +08:00
runhaskell Setup build
2012-06-17 11:29:48 +08:00
runhaskell Setup haddock
runhaskell Setup register --gen-script
2012-06-17 11:29:48 +08:00
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
2013-12-26 17:57:37 +08:00
2012-06-17 11:29:48 +08:00
package() {
2013-12-26 18:19:58 +08:00
cd "${srcdir}/HTTP-${pkgver}"
2013-12-26 17:57:37 +08:00
install -D -m744 register.sh \
2014-04-18 07:14:34 +08:00
"${pkgdir}/usr/share/haskell/${pkgname}/register.sh"
2013-12-26 17:57:37 +08:00
install -m744 unregister.sh \
2014-04-18 07:14:34 +08:00
"${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh"
2013-12-26 17:57:37 +08:00
install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
# Documentation
2014-04-18 07:14:34 +08:00
ln -s "/usr/share/doc/${pkgname}/html" \
2013-12-26 17:57:37 +08:00
"${pkgdir}/usr/share/doc/ghc/html/libraries/HTTP"
# License
install -D -m644 LICENSE \
2014-04-18 07:14:34 +08:00
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
2013-12-26 17:57:37 +08:00
runhaskell Setup copy --destdir="${pkgdir}"
2012-06-17 11:29:48 +08:00
}
2014-04-18 07:14:34 +08:00