haskell-transformers: rebuilt and updated PKGBUILD

This commit is contained in:
utg 2014-04-17 23:28:38 +00:00
parent 9eabd2fd22
commit cf64c1e1a4
3 changed files with 126 additions and 24 deletions

View File

@ -1,22 +1,38 @@
# Maintainer: Stephen McIntosh <stephenmac7[at]gmail[dot]com> # 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=transformers _hkgname=transformers
pkgname=haskell-transformers pkgname=haskell-transformers
pkgver=0.3.0.0 pkgver=0.3.0.0
pkgrel=2 pkgrel=5
pkgdesc="Concrete functor and monad transformers" pkgdesc="Concrete functor and monad transformers"
url="http://hackage.haskell.org/package/${_hkgname}" url="http://hackage.haskell.org/package/${_hkgname}"
license=('custom:BSD3') license=('custom:BSD3')
arch=('i686' 'x86_64') arch=('x86_64')
makedepends=() depends=('ghc=7.6.3-1')
depends=('ghc') options=('staticlibs')
options=('strip')
source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
install=${pkgname}.install install=${pkgname}.install
md5sums=('852dc0b79cc2bcb39136287d3dd385e5') md5sums=('852dc0b79cc2bcb39136287d3dd385e5')
build() { build() {
cd ${srcdir}/${_hkgname}-${pkgver} cd ${srcdir}/${_hkgname}-${pkgver}
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 configure \
-O \
${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } \
--enable-split-objs \
--enable-shared \
--prefix=/usr \
--docdir=/usr/share/doc/haskell-transformers \
--libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build runhaskell Setup build
runhaskell Setup haddock runhaskell Setup haddock
runhaskell Setup register --gen-script runhaskell Setup register --gen-script
@ -25,11 +41,22 @@ build() {
} }
package() { package() {
cd ${srcdir}/${_hkgname}-${pkgver} 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 -m744 register.sh \
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries "${pkgdir}/usr/share/haskell/haskell-transformers/register.sh"
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname} install -m744 unregister.sh \
runhaskell Setup copy --destdir=${pkgdir} "${pkgdir}/usr/share/haskell/haskell-transformers/unregister.sh"
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
# Documentation
ln -s "/usr/share/doc/haskell-transformers/html" \
"${pkgdir}/usr/share/doc/ghc/html/libraries/transformers"
# License
install -D -m644 LICENSE \
"${pkgdir}/usr/share/licenses/haskell-transformers/LICENSE"
rm -f "${pkgdir}/usr/share/doc/haskell-transformers/LICENSE"
runhaskell Setup copy --destdir="${pkgdir}"
} }
#${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p }

View File

@ -0,0 +1,58 @@
# # # helpful information # # #
When you update Haskell packages you'll have to update the entire stack to not break it.
To help you I wrote a simple guide step-by-step.
## NOTE: it's possible that some new haskell-package has been added to our repository, so before you update the entire stack you need to check it and then proceed
> First you have to update these packaes:
haskell-binary
haskell-bytestring-show
haskell-dataenc
haskell-deepseq
haskell-extensible-exceptions
haskell-html
haskell-mmap
haskell-primitive
haskell-random
haskell-syb
haskell-stm
haskell-terminfo
haskell-transformers
haskell-mtl
haskell-utf8-string
haskell-zlib
haskell-tar
> Then update one-by-one the following packages:
haskell-text
haskell-parsec
haskell-network
haskell-http
haskell-hslogger
haskell-vector
haskell-regex-base
haskell-regex-posix
haskell-regex-compat
haskell-hashed-storage
haskell-haskeline
> ...lastly you have to update this:
haskell-cabal-install

View File

@ -1,18 +1,35 @@
HS_DIR=usr/share/haskell/haskell-transformers pkgname=haskell-transformers
_register() {
usr/share/haskell/${pkgname}/register.sh
}
_unregister() {
usr/share/haskell/${pkgname}/unregister.sh
}
_gen_contents() {
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
post_install() { post_install() {
${HS_DIR}/register.sh _register
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) _gen_contents
} }
pre_upgrade() { pre_upgrade() {
${HS_DIR}/unregister.sh _unregister
} }
post_upgrade() { post_upgrade() {
${HS_DIR}/register.sh _register
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) _gen_contents
} }
pre_remove() { pre_remove() {
${HS_DIR}/unregister.sh _unregister
} }
post_remove() { post_remove() {
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) _gen_contents
} }