blob: 8aec2383194b388f68ea205dbb2860d661983663 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jose-Luis Rivas <ghostbar@riseup.net>
pkgname=nodejs-current
# The current stable version, i.e. non-LTS.
pkgver=7.2.1
pkgrel=0
pkgdesc="JavaScript runtime built on V8 engine - current stable version"
url="http://nodejs.org/"
arch="all"
license="MIT"
depends_dev="libuv"
# gold is needed for mksnapshot
makedepends="$depends_dev python2 openssl-dev zlib-dev libuv-dev linux-headers
paxmark binutils-gold http-parser-dev ca-certificates"
subpackages="$pkgname-dev $pkgname-doc"
replaces="nodejs nodejs-lts" # nodejs-lts for backward compatibility
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
use-system-ca-certs.patch
dont-run-gyp-files-for-bundled-deps.patch"
builddir="$srcdir/node-v$pkgver"
prepare() {
default_prepare || return 1
# Remove bundled CA certificates.
rm -f src/node_root_certs.h
# Remove bundled dependencies that we're not using.
rm -rf deps/http_parser deps/openssl deps/uv deps/zlib
}
build() {
cd "$builddir"
./configure --prefix=/usr \
--shared-zlib \
--shared-libuv \
--shared-openssl \
--shared-http-parser \
|| return 1
# we need run mksnapshot at build time so paxmark it early
make -C out mksnapshot BUILDTYPE=Release \
&& paxmark -m out/Release/mksnapshot \
&& make || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
# paxmark so JIT works
paxmark -m "$pkgdir"/usr/bin/node || return 1
cp -pr "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share || return 1
local d; for d in doc html man; do
rm -r "$pkgdir"/usr/lib/node_modules/npm/$d || return 1
done
}
md5sums="20167fa2b3ef3e17430af4fae9a26427 node-v7.2.1.tar.gz
a785f2e6018cdace456b0ab518474453 use-system-ca-certs.patch
5b1b27a33063602990f5495d3b01b587 dont-run-gyp-files-for-bundled-deps.patch"
sha256sums="fd08b8ba43b0596a7160b09a37113ac03b4b0976ec7e48980b7b8c078aa51b02 node-v7.2.1.tar.gz
e0384006b04fef35c2c5e65d0cde6aae7efbc314d38c3c9ade0ae599f2b77bc2 use-system-ca-certs.patch
6886ee83f76eb68dc948da844e548f060caf360ca039bb2c1ee7ea0cd2d8dbf3 dont-run-gyp-files-for-bundled-deps.patch"
sha512sums="501f23cbe42bcb5eef785113d05b35e4507fb7e5b9ae474eeef2d9dd12270f08653493b5bc28306f2b3e0db54a3703ba6c3606de66ac8eeb0212670fe192b978 node-v7.2.1.tar.gz
877669ed466606bc6afd67083d82b365a969b6626f4248a7f41249958a96e7bb6a6c656715c7b80e763bb53c6cf5789e604e15e05ff74f58e5441acc560350af use-system-ca-certs.patch
ba95f21b1e80717ef63941854e7ed412f64a91da068c0dbf0d6d9697333ee266c9f4cd7bf1a01111eeb28aa66adefd8a58cfb3e82debb84b43e35e9dc914dd36 dont-run-gyp-files-for-bundled-deps.patch"
|