Added Haskell Bytestring Show module.

This commit is contained in:
Adrian Chaves Fernandez (Gallaecio) 2012-11-01 11:07:53 +00:00
parent 9bd8844e08
commit 0cad390e24
2 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#
# Apps Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrian Chaves Fernandez (Gallaecio) <adriyetichaves@gmail.com>
_hkgname=bytestring-show
pkgname=haskell-bytestring-show
pkgver=0.3.5.2
pkgrel=1
pkgdesc="Efficient conversion of values into readable byte strings."
url="http://hackage.haskell.org/package/bytestring-show"
license=("custom:BSD3")
arch=('x86_64')
makedepends=()
depends=("ghc")
source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
sha256sums=('b7bc742e6108c565839cb6b6a13ab20cdc1776c01bddebe434d3452d76c0e92f')
install="${pkgname}.install"
build() {
cd ${srcdir}/${_hkgname}-${pkgver}
runhaskell Setup configure -O -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() {
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
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
runhaskell Setup copy --destdir=${pkgdir}
# Lincese.
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
}

View File

@ -0,0 +1,37 @@
pkgname=haskell-bytestring-show
HS_DIR=/usr/share/haskell/${pkgname}
registerPackage() {
${HS_DIR}/register.sh
}
unregisterPackage() {
${HS_DIR}/unregister.sh
}
updatePackageIndex() {
(cd /usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
post_install() {
registerPackage
updatePackageIndex
}
pre_upgrade() {
unregisterPackage
}
post_upgrade() {
registerPackage
updatePackageIndex
}
pre_remove() {
unregisterPackage
}
post_remove() {
updatePackageIndex
}