1 # Maintainer: Alper Kanat <alperkanat@raptiye.org>
2 # Contributor: Dongsheng Cai <dongsheng@moodle.com>
3 # Contributor: Anish Tondwalkar <2012atondwal@tjhsst.edu>
8 pkgdesc="Evented I/O for V8 javascript"
10 url="http://nodejs.org/"
11 license=("custom:nodejs")
13 makedepends=("gcc" "coreutils")
14 optdepends=("openssl: TLS support")
17 _gitorigin="git://github.com/joyent/node.git"
23 msg "Connecting to gitosis git server..."
25 if [ -d ${srcdir}/${_gitname} ]; then
26 cd ${_gitname} && git pull origin
27 msg "The local files are updated."
29 git clone ${_gitorigin} ${_gitname}
32 msg "GIT checkout done or server timeout!"
34 cd ${srcdir}/${_gitname}
36 msg "applying python2 fixes.."
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"
44 sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
45 sed -i "s|python |python2 |" Makefile
47 msg "Starting make..."
49 ./configure --prefix=/usr
52 msg "building documentation.."
57 cd ${srcdir}/${_gitname}
59 msg "copying files to destination.."
61 # copying files to destination
62 make DESTDIR="$pkgdir/" install
64 msg "copying license information.."
66 # copying license information
67 install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
71 # copying doc related stuff
72 install -D -m644 AUTHORS $pkgdir/usr/share/doc/$pkgname/AUTHORS
73 install -D -m644 README.md $pkgdir/usr/share/doc/$pkgname/README.md
78 cp -r $srcdir/${_gitname}/doc/ $pkgdir/usr/share/doc/$pkgname/
81 # vim:set ts=2 sw=2 et: