Advertisement
Guest User

Untitled

a guest
Jun 7th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. # Maintainer: Alper Kanat <alperkanat@raptiye.org>
  2. # Contributor: Dongsheng Cai <dongsheng@moodle.com>
  3. # Contributor: Anish Tondwalkar <2012atondwal@tjhsst.edu>
  4.  
  5. pkgname=nodejs-git
  6. pkgver=20110524
  7. pkgrel=1
  8. pkgdesc="Evented I/O for V8 javascript"
  9. arch=("any")
  10. url="http://nodejs.org/"
  11. license=("custom:nodejs")
  12. depends=("python2")
  13. makedepends=("gcc" "coreutils")
  14. optdepends=("openssl: TLS support")
  15. provides=("nodejs")
  16.  
  17. _gitorigin="git://github.com/joyent/node.git"
  18. _gitname="nodejs"
  19.  
  20. build() {
  21. cd ${srcdir}
  22.  
  23. msg "Connecting to gitosis git server..."
  24.  
  25. if [ -d ${srcdir}/${_gitname} ]; then
  26. cd ${_gitname} && git pull origin
  27. msg "The local files are updated."
  28. else
  29. git clone ${_gitorigin} ${_gitname}
  30. fi
  31.  
  32. msg "GIT checkout done or server timeout!"
  33.  
  34. cd ${srcdir}/${_gitname}
  35.  
  36. msg "applying python2 fixes.."
  37.  
  38. # python2 fix
  39. for file in $(find . -name '*.py' -print) wscript tools/waf-light tools/node-waf; do
  40. sed -i 's_^#!.*/usr/bin/python2*_#!/usr/bin/python2_' "$file"
  41. sed -i 's_^#!.*/usr/bin/env.*python2*_#!/usr/bin/env python2_' "$file"
  42. done
  43.  
  44. sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
  45. sed -i "s|python |python2 |" Makefile
  46.  
  47. msg "Starting make..."
  48.  
  49. ./configure --prefix=/usr
  50. make
  51.  
  52. msg "building documentation.."
  53. make doc
  54. }
  55.  
  56. package() {
  57. cd ${srcdir}/${_gitname}
  58.  
  59. msg "copying files to destination.."
  60.  
  61. # copying files to destination
  62. make DESTDIR="$pkgdir/" install
  63.  
  64. msg "copying license information.."
  65.  
  66. # copying license information
  67. install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
  68.  
  69. msg "copying docs.."
  70.  
  71. # copying doc related stuff
  72. install -D -m644 AUTHORS $pkgdir/usr/share/doc/$pkgname/AUTHORS
  73. install -D -m644 README.cmake $pkgdir/usr/share/doc/$pkgname/README.cmake
  74. install -D -m644 README.md $pkgdir/usr/share/doc/$pkgname/README.md
  75. install -D -m644 TODO $pkgdir/usr/share/doc/$pkgname/TODO
  76. install -D -m644 TODO.win32 $pkgdir/usr/share/doc/$pkgname/TODO.win32
  77.  
  78. msg "copying api docs.."
  79.  
  80. # copying api docs
  81. cp -r $srcdir/${_gitname}/build/doc/api/ $pkgdir/usr/share/doc/$pkgname/
  82. }
  83.  
  84. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement