This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

haskell-hashable

By: a guest on Nov 15th, 2012  |  syntax: Bash  |  size: 1.62 KB  |  views: 41  |  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=hashable
  3. _licensefile=LICENSE
  4.  
  5. # PKGBUILD options/directives
  6. pkgname=haskell-hashable
  7. pkgver=1.1.2.5
  8. pkgrel=1
  9. pkgdesc="A class for types that can be converted to a hash value"
  10. url="http://github.com/tibbe/hashable"
  11. license=("BSD3")
  12. arch=('i686' 'x86_64')
  13. makedepends=()
  14. depends=("ghc"
  15.          )
  16. options=('strip')
  17. source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
  18. sha256sums=('3fb5d430c9289ebada4991a76fd78f028aaaf17957dc666ddc7b89c98a54713d')
  19. install="${pkgname}.install"
  20.  
  21. # PKGBUILD functions
  22. build() {
  23.     cd ${srcdir}/${_hkgname}-${pkgver}
  24.    
  25.     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
  26.         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
  27.         --libsubdir=\$compiler/site-local/\$pkgid
  28.     runhaskell Setup build
  29.     runhaskell Setup haddock
  30.     runhaskell Setup register --gen-script
  31.     runhaskell Setup unregister --gen-script
  32.     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
  33. }
  34.  
  35. package() {
  36.     cd ${srcdir}/${_hkgname}-${pkgver}
  37.     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
  38.     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
  39.     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
  40.     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
  41.     runhaskell Setup copy --destdir=${pkgdir}
  42.     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  43.     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}
  44. }
clone this paste RAW Paste Data