haskell-mtl: rebuilt and updated PKGBUILD

This commit is contained in:
utg 2014-04-17 23:16:37 +00:00
parent 5f6bce918d
commit 7d7eadec50
3 changed files with 124 additions and 25 deletions

View File

@ -1,22 +1,37 @@
# 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=mtl _hkgname=mtl
pkgname=haskell-mtl pkgname=haskell-mtl
pkgver=2.1.2 pkgver=2.1.2
pkgrel=1 pkgrel=4
pkgdesc="Monad classes, using functional dependencies" pkgdesc="Monad classes, using functional dependencies"
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' "haskell-transformers=0.3.0.0")
depends=('ghc' 'haskell-transformers') options=('strip' '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=('943c110524d96126bfa0e61f7df1ebcd') sha512sums=('ef8043adeb2746c770bebd4683c95c399bdc047c278b619d89230f342d13c33f0a9275c6be399e6da329f385ff209ff537e002b82d5075684202e8703fc5e29d')
build() { build() {
cd ${srcdir}/${_hkgname}-${pkgver} cd ${srcdir}/${_hkgname}-${pkgver}
runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \ runhaskell Setup configure \
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid -O \
${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } \
--enable-split-objs \
--enable-shared \
--prefix=/usr \
--docdir=/usr/share/doc/haskell-mtl \
--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 +40,20 @@ build() {
} }
package() { package() {
cd ${srcdir}/${_hkgname}-${pkgver} cd ${srcdir}/${_hkgname}-${pkgver}
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh install -D -m744 register.sh \
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh "${pkgdir}/usr/share/haskell/${pkgname}/register.sh"
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries install -m744 unregister.sh \
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname} "${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh"
runhaskell Setup copy --destdir=${pkgdir} install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE # Documentation
ln -s "/usr/share/doc/${pkgname}/html" \
"${pkgdir}/usr/share/doc/ghc/html/libraries/mtl"
# License
install -D -m644 LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
runhaskell Setup copy --destdir="${pkgdir}"
} }

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-mtl pkgname=haskell-mtl
_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
} }