pkgname=nodejs pkgver=5.11.0 pkgrel=1 pkgdesc='Evented I/O for V8 javascript' arch=('x86_64') url='http://nodejs.org/' license=('MIT') depends=('openssl' 'zlib' 'icu') makedepends=('python2' 'procps-ng') optdepends=('npm: nodejs package manager') checkdepends=('curl') source=("http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz") sha256sums=('ef41b01a9e49de5a5d160071166f911d0bc9ff6a0bd0e88ea4863df572d95e91') prepare() { cd node-v$pkgver msg 'Fixing for python2 name' find -type f -exec sed \ -e 's_^#!/usr/bin/env python$_&2_' \ -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \ -e 's_^#!/usr/bin/python$_&2_' \ -e 's_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\ -e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\ -e "s_'python'_'python2'_" -i {} \; find test/ -type f -exec sed 's_python _python2 _' -i {} \; } build() { cd node-v$pkgver export PYTHON=python2 ./configure \ --prefix=/usr \ --with-intl=system-icu \ --without-npm \ --shared-zlib \ --shared-openssl make } check() { cd node-v$pkgver make test || warning "Tests failed" } package() { cd node-v$pkgver make DESTDIR="$pkgdir" install # install docs as per user request install -d "$pkgdir"/usr/share/doc/nodejs cp -r doc/api/{*.html,assets} \ "$pkgdir"/usr/share/doc/nodejs install -D -m644 LICENSE \ "$pkgdir"/usr/share/licenses/nodejs/LICENSE }