Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 5th, 2011  |  syntax: Bash  |  size: 1.58 KB  |  hits: 92  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: adam vogt <vogt.adam<<at>>gmail.com>
  2. # Package generated by cabal2arch 0.6
  3. pkgname=xmonad-darcs
  4. pkgrel=2
  5. pkgver=20100706
  6. pkgdesc="A tiling window manager"
  7. url="http://hackage.haskell.org/package/xmonad"
  8. license=('custom:BSD3')
  9. arch=('i686' 'x86_64')
  10. conflicts=('xmonad')
  11. depends=('gmp' 'libxinerama' 'ghc' 'haskell-x11>=1.5.0.0' 'haskell-mtl')
  12. makedepends=('darcs')
  13. options=('strip')
  14. install=xmonad.install
  15. _darcstrunk="http://code.haskell.org"
  16. _darcsmod="xmonad"
  17.  
  18. build() {
  19.   if [[ -d ${_darcsmod}/_darcs ]]; then
  20.     msg "Retrieving new patches"
  21.     cd ${_darcsmod}
  22.     darcs pull -a ${_darcstrunk}/${_darcsmod}
  23.   else
  24.     msg "Retrieving complete sources"
  25.     darcs get --partial ${_darcstrunk}/${_darcsmod}
  26.   fi
  27.  
  28.   cd "${srcdir}/${_darcsmod}"
  29.   runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname}
  30.   runhaskell Setup build
  31.   runhaskell Setup haddock
  32.   runhaskell Setup register --gen-script
  33.   runhaskell Setup unregister --gen-script
  34. }
  35.  
  36. package() {
  37.   cd ${_darcsmod}
  38.   install -D -m744 register.sh "${pkgdir}/usr/share/haskell/${pkgname}/register.sh"
  39.   install -m744 unregister.sh "${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh"
  40.   install -d -m755 "${pkgdir}/usr/share/doc/ghc/libraries"
  41.   runhaskell Setup copy --destdir="${pkgdir}"
  42.   mkdir -p "${pkgdir}/usr/share/doc/ghc/html/libraries/"
  43.   ln -s "${pkgdir}/usr/share/doc/xmonad-darcs/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/xmonad"
  44.   install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  45.   rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
  46. }