Created
April 17, 2011 10:42
-
-
Save kuno/923931 to your computer and use it in GitHub Desktop.
nodejs based on official arch v8 package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: James Campos <[email protected]> | |
# 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 <[email protected]> | |
pkgname=nodejs | |
pkgver=0.4.6 | |
pkgrel=2 | |
pkgdesc="Evented I/O for V8 javascript" | |
arch=('i686' 'x86_64') | |
url="http://nodejs.org/" | |
license=('MIT') | |
depends=('python2' 'v8>=3.1.8.8') | |
optdepends=('openssl: TLS support') | |
source=("http://nodejs.org/dist/node-v$pkgver.tar.gz") | |
build() { | |
cd ${srcdir} | |
cd "node-v${pkgver}" | |
# python2 fix | |
if echo `python --version 2>&1` | grep -q "Python 3"; then | |
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/ \ | |
--shared-v8 \ | |
--shared-v8-includes=/usr/include/ \ | |
--shared-v8-libpath=/usr/lib/ \ | |
--shared-v8-libname='v8' || return 1 | |
sed -i "s|python |python2 |" Makefile | |
fi | |
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 | |
} | |
md5sums=('adc911c886fbe0f283cf994403fd4e3c') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment