desktop/haskell-http/PKGBUILD

60 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
2015-02-23 07:43:59 +08:00
pkgver=4000.2.19
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')
2015-02-23 07:43:59 +08:00
depends=('ghc' 'haskell-mtl>=2.0' 'haskell-mtl<2.3' 'haskell-network<2.7' 'haskell-parsec')
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")
2015-02-23 07:43:59 +08:00
md5sums=('92f1d0d3ca56ddf1519aa4ea5b9c7a93')
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}"
2013-12-26 17:57:37 +08:00
runhaskell Setup configure \
-O \
2015-02-23 07:43:59 +08:00
-p \
2013-12-26 17:57:37 +08:00
--enable-split-objs \
--enable-shared \
2014-04-18 07:14:34 +08:00
--prefix=/usr \
--docdir=/usr/share/doc/haskell-http \
--libsubdir=\$compiler/site-local/\$pkgid
2012-06-17 11:29:48 +08:00
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
}
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