Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

haskell-haskell-src-exts

By: a guest on Jul 11th, 2012  |  syntax: Bash  |  size: 1.71 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # custom variables
  2. _hkgname=haskell-src-exts
  3. _licensefile=LICENSE
  4.  
  5. # PKGBUILD options/directives
  6. pkgname=haskell-haskell-src-exts
  7. pkgver=1.13.3
  8. pkgrel=1
  9. pkgdesc="Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer"
  10. url="http://code.haskell.org/haskell-src-exts"
  11. license=("BSD3")
  12. arch=('i686' 'x86_64')
  13. makedepends=('ghc')
  14. depends=('haskell-array' 'haskell-cpphs' 'haskell-pretty' 'happy')
  15. options=('strip')
  16. source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
  17. sha256sums=('259186b608e616351462c3ceccd5350a6569992c987119021bf53510a5d15b7c')
  18. install="${pkgname}.install"
  19.  
  20. # PKGBUILD functions
  21. build() {
  22.     cd ${srcdir}/${_hkgname}-${pkgver}
  23.    
  24.     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
  25.         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
  26.         --libsubdir=\$compiler/site-local/\$pkgid
  27.     runhaskell Setup build
  28.     runhaskell Setup haddock
  29.     runhaskell Setup register --gen-script
  30.     runhaskell Setup unregister --gen-script
  31.     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
  32. }
  33.  
  34. package() {
  35.     cd ${srcdir}/${_hkgname}-${pkgver}
  36.     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
  37.     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
  38.     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
  39.     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
  40.     runhaskell Setup copy --destdir=${pkgdir}
  41.     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  42.     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}
  43. }