diff --git a/haskell-mtl/PKGBUILD b/haskell-mtl/PKGBUILD index 0c7f5cd69..06f61e0ba 100644 --- a/haskell-mtl/PKGBUILD +++ b/haskell-mtl/PKGBUILD @@ -1,22 +1,37 @@ -# Maintainer: Stephen McIntosh +# Maintainer: UtG +# Contributors: H W Tovetjärn (totte) +# Stephen McIntosh +# Thomas Dziedzic +# Vesa Kaihlavirta +# Arch Haskell Team + +## NOTE: when you update Haskell packages you'll have to update the entire stack to not break it ## + _hkgname=mtl pkgname=haskell-mtl pkgver=2.1.2 -pkgrel=1 +pkgrel=4 pkgdesc="Monad classes, using functional dependencies" url="http://hackage.haskell.org/package/${_hkgname}" license=('custom:BSD3') -arch=('i686' 'x86_64') -makedepends=() -depends=('ghc' 'haskell-transformers') -options=('strip') +arch=('x86_64') +depends=('ghc=7.6.3-1' "haskell-transformers=0.3.0.0") +options=('strip' 'staticlibs') source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) install=${pkgname}.install -md5sums=('943c110524d96126bfa0e61f7df1ebcd') +sha512sums=('ef8043adeb2746c770bebd4683c95c399bdc047c278b619d89230f342d13c33f0a9275c6be399e6da329f385ff209ff537e002b82d5075684202e8703fc5e29d') + build() { 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-mtl \ + --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build runhaskell Setup haddock runhaskell Setup register --gen-script @@ -25,11 +40,20 @@ build() { } 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} - install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE - rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE + 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/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}" } diff --git a/haskell-mtl/README_(for_Packager) b/haskell-mtl/README_(for_Packager) new file mode 100644 index 000000000..957033065 --- /dev/null +++ b/haskell-mtl/README_(for_Packager) @@ -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 + diff --git a/haskell-mtl/haskell-mtl.install b/haskell-mtl/haskell-mtl.install index 9325811e8..7ca820fe6 100644 --- a/haskell-mtl/haskell-mtl.install +++ b/haskell-mtl/haskell-mtl.install @@ -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() { - ${HS_DIR}/register.sh - (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) + _register + _gen_contents } + pre_upgrade() { - ${HS_DIR}/unregister.sh + _unregister } + post_upgrade() { - ${HS_DIR}/register.sh - (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) + _register + _gen_contents } + pre_remove() { - ${HS_DIR}/unregister.sh + _unregister } + post_remove() { - (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) -} + _gen_contents +} \ No newline at end of file