Skip to content

Instantly share code, notes, and snippets.

@kuno kuno/PKGBUILD
Created Apr 17, 2011

Embed
What would you like to do?
nodejs based on official arch v8 package
# 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.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
You can’t perform that action at this time.