desktop/haskell-bytestring-show/PKGBUILD

65 lines
2.3 KiB
Bash

# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
# Contributors: H W Tovetjärn (totte) <totte@tott.es>
# Stephen McIntosh <stephenmac7[at]gmail[dot]com>
# Thomas Dziedzic <gostrc@gmail.com>
# Vesa Kaihlavirta <vesa@archlinux.org>
# Arch Haskell Team <arch-haskell@haskell.org>
## NOTE: when you update Haskell packages you'll have to update the entire stack to not break it ##
_hkgname=bytestring-show
pkgname=haskell-bytestring-show
pkgver=0.3.5.6
pkgrel=5
pkgdesc="Efficient conversion of values into readable byte strings."
url="http://hackage.haskell.org/package/bytestring-show"
license=("BSD3")
arch=('x86_64')
depends=("ghc")
options=('staticlibs')
source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
md5sums=('c9041eed86a52e17e6b53a415967f7cb')
install="${pkgname}.install"
build() {
cd "${srcdir}/${_hkgname}-${pkgver}"
# update outdated dependency
sed 's/build-depends: integer-gmp >= 0.2 && < 0.5/build-depends: integer-gmp >= 0.2 \&\& < 0.6/' -i bytestring-show.cabal
runhaskell Setup configure \
-O \
${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } \
--enable-split-objs \
--enable-shared \
--prefix=/usr \
--docdir="/usr/share/doc/${pkgname}" \
--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() {
depends=("ghc=`pacman -Q ghc | cut -f2 -d\ |cut -f1 -d-`")
cd "${srcdir}/${_hkgname}-${pkgver}"
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
# Documentation
ln -s "/usr/share/doc/${pkgname}/html" \
"${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
# License
install -D -m644 LICENSE \
"${pkgdir}/usr/share/licenses/haskell-bytestring-show/LICENSE"
rm -f "${pkgdir}/usr/share/doc/haskell-bytestring-show/LICENSE"
runhaskell Setup copy --destdir="${pkgdir}"
}