2012-06-08 06:34:25 +08:00
|
|
|
pkgname=nodejs
|
2018-10-01 02:37:21 +08:00
|
|
|
pkgver=10.11.0
|
2016-03-26 01:22:16 +08:00
|
|
|
pkgrel=1
|
2015-01-21 21:32:59 +08:00
|
|
|
pkgdesc='Evented I/O for V8 javascript'
|
2015-01-27 21:04:28 +08:00
|
|
|
arch=('x86_64')
|
2012-06-08 06:34:25 +08:00
|
|
|
url='http://nodejs.org/'
|
|
|
|
license=('MIT')
|
2015-08-30 20:23:57 +08:00
|
|
|
makedepends=('python2' 'procps-ng')
|
|
|
|
optdepends=('npm: nodejs package manager')
|
2015-01-21 21:32:59 +08:00
|
|
|
checkdepends=('curl')
|
2015-08-30 20:23:57 +08:00
|
|
|
source=("http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz")
|
2018-10-01 02:37:21 +08:00
|
|
|
sha256sums=('f721552552fb11ef99aba290fc6e696a8647adc98d643db6651e81ed07c4037e')
|
2015-01-21 21:32:59 +08:00
|
|
|
|
|
|
|
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_' \
|
2015-10-13 06:45:48 +08:00
|
|
|
-e 's_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\
|
|
|
|
-e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\
|
2015-01-21 21:32:59 +08:00
|
|
|
-e "s_'python'_'python2'_" -i {} \;
|
|
|
|
find test/ -type f -exec sed 's_python _python2 _' -i {} \;
|
|
|
|
}
|
2012-06-08 06:34:25 +08:00
|
|
|
|
|
|
|
build() {
|
2015-01-21 21:32:59 +08:00
|
|
|
cd node-v$pkgver
|
|
|
|
|
2012-06-08 06:34:25 +08:00
|
|
|
export PYTHON=python2
|
2015-01-21 21:32:59 +08:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2017-02-03 04:45:38 +08:00
|
|
|
--with-intl=full-icu \
|
|
|
|
--download=all \
|
2018-04-28 21:14:17 +08:00
|
|
|
--without-npm
|
2012-06-08 06:34:25 +08:00
|
|
|
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2015-01-21 21:32:59 +08:00
|
|
|
cd node-v$pkgver
|
|
|
|
make test || warning "Tests failed"
|
2012-06-08 06:34:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2015-01-21 21:32:59 +08:00
|
|
|
cd node-v$pkgver
|
2012-06-08 06:34:25 +08:00
|
|
|
|
2015-01-21 21:32:59 +08:00
|
|
|
make DESTDIR="$pkgdir" install
|
2012-06-08 06:34:25 +08:00
|
|
|
|
|
|
|
# install docs as per user request
|
2015-01-21 21:32:59 +08:00
|
|
|
install -d "$pkgdir"/usr/share/doc/nodejs
|
|
|
|
cp -r doc/api/{*.html,assets} \
|
|
|
|
"$pkgdir"/usr/share/doc/nodejs
|
2012-06-08 06:34:25 +08:00
|
|
|
|
|
|
|
install -D -m644 LICENSE \
|
2015-01-21 21:32:59 +08:00
|
|
|
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
|
2012-06-08 06:34:25 +08:00
|
|
|
}
|