Advertisement
Guest User

haskell-cpphs

a guest
Jul 11th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.70 KB | None | 0 0
  1. # custom variables
  2. _hkgname=cpphs
  3. _licensefile=LICENCE-LGPL
  4.  
  5. # PKGBUILD options/directives
  6. pkgname=haskell-cpphs
  7. pkgver=1.14
  8. pkgrel=1
  9. pkgdesc="A liberalised re-implementation of cpp, the C pre-processor."
  10. url="http://haskell.org/cpphs/"
  11. license=("LGPL")
  12. arch=('i686' 'x86_64')
  13. makedepends=("ghc")
  14. depends=('haskell-directory' 'haskell-old-time' 'haskell-old-locale')
  15. provides=("cpphs")
  16. replaces=("cpphs")
  17. options=('strip')
  18. source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
  19. sha256sums=('1fcccb0c9e7acd832cb2eea61286d8ab4a213caabc9bd12930deaec5a87f4cd3')
  20. install="${pkgname}.install"
  21.  
  22. # PKGBUILD functions
  23. build() {
  24.     cd ${srcdir}/${_hkgname}-${pkgver}
  25.    
  26.     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
  27.         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
  28.         --libsubdir=\$compiler/site-local/\$pkgid
  29.     runhaskell Setup build
  30.     runhaskell Setup haddock
  31.     runhaskell Setup register --gen-script
  32.     runhaskell Setup unregister --gen-script
  33.     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
  34. }
  35.  
  36. package() {
  37.     cd ${srcdir}/${_hkgname}-${pkgver}
  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/html/libraries
  41.     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
  42.     runhaskell Setup copy --destdir=${pkgdir}
  43.     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  44.     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement