Skip to content

Instantly share code, notes, and snippets.

@kuno
Created November 18, 2010 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuno/704629 to your computer and use it in GitHub Desktop.
Save kuno/704629 to your computer and use it in GitHub Desktop.
# Maintainer: James Campos <james.r.campos@gmail.com>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
# Contributor: TIanyi Cui <tianyicui@gmail.com>
pkgname=nodejs
pkgver=0.3.1
pkgrel=1
pkgdesc="Evented I/O for V8 javascript"
arch=('i686' 'x86_64')
url="http://nodejs.org/"
license=('custom:nodejs')
depends=('openssl' 'python2')
source=("http://nodejs.org/dist/node-v$pkgver.tar.gz")
build() {
cd ${srcdir}
cd "node-v${pkgver}"
# python2 fix
for file in $(find . -name '*.py' -print) wscript tools/waf-light tools/node-waf; do
sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
done
sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
./configure --prefix=/usr/ || return 1
sed -i "s|python |python2 |" Makefile
make || return 1
tools/waf-light install --destdir=$pkgdir || return 1
install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
install -D -m644 ChangeLog $pkgdir/usr/share/${pkgname}/ChangeLog
install -D -m644 README $pkgdir/usr/share/${pkgname}/README
}
md5sums=('6b33fcb3fdeeb4e758082ca787c86864')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment