mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
pkgname=nodejs
|
|
pkgver=6.8.1
|
|
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=('736f7651f59a78d5a0d88ab2430c93fc29a8efd1c06fd3fb4eb915b262bc2769')
|
|
|
|
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
|
|
}
|