desktop/nodejs/PKGBUILD

61 lines
1.4 KiB
Bash
Raw Normal View History

pkgname=nodejs
2017-05-05 07:31:36 +08:00
pkgver=7.10.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')
url='http://nodejs.org/'
license=('MIT')
2017-02-03 04:45:38 +08:00
depends=('openssl')
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")
2017-05-05 07:31:36 +08:00
sha256sums=('c4843fe8bffb59c2327063a5e67a89af60d7927f7ace7548695a2cf4c1aa6d03')
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 {} \;
}
build() {
2015-01-21 21:32:59 +08:00
cd node-v$pkgver
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 \
2015-08-30 20:23:57 +08:00
--without-npm \
2016-02-15 15:43:13 +08:00
--shared-openssl
make
}
check() {
2015-01-21 21:32:59 +08:00
cd node-v$pkgver
make test || warning "Tests failed"
}
package() {
2015-01-21 21:32:59 +08:00
cd node-v$pkgver
2015-01-21 21:32:59 +08:00
make DESTDIR="$pkgdir" install
# 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
install -D -m644 LICENSE \
2015-01-21 21:32:59 +08:00
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
}