summaryrefslogtreecommitdiff
path: root/user/node/APKBUILD
blob: 954eee721d1dc2c31737aa13c054e71645cfe049 (plain) (blame)
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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=node
pkgver=16.15.0
pkgrel=0
pkgdesc="JavaScript runtime"
url="https://nodejs.org/"
arch="all"
options="net"  # Required in check()
license="MIT AND ICU AND BSD-3-Clause AND BSD-2-Clause AND ISC AND Public-Domain AND Zlib AND Artistic-2.0 AND Apache-2.0 AND CC0-1.0"
depends=""
makedepends="c-ares-dev http-parser-dev icu-dev libexecinfo-dev libuv-dev
	nghttp2-dev openssl-dev python3 zlib-dev samurai"
subpackages="$pkgname-dev $pkgname-doc"
source="https://nodejs.org/download/release/v$pkgver/node-v$pkgver.tar.xz"
builddir="$srcdir/$pkgname-v$pkgver"

# secfixes:
#   10.16.3-r0:
#     - CVE-2019-9511
#     - CVE-2019-9512
#     - CVE-2019-9513
#     - CVE-2019-9514
#     - CVE-2019-9515
#     - CVE-2019-9516
#     - CVE-2019-9517
#     - CVE-2019-9518
#   10.21.0-r0:
#     - CVE-2020-7598
#     - CVE-2020-8174

build() {
	python3 configure.py \
		--prefix=/usr \
		--shared-zlib \
		--shared-openssl \
		--shared-cares \
		--shared-nghttp2 \
		--ninja \
		--openssl-use-def-ca-store \
		--with-icu-default-data-dir=$(icu-config --icudatadir) \
		--with-intl=small-icu \
		--without-corepack \
		--without-npm

	make BUILDTYPE=Release DESTDIR="$pkgdir"
}

check() {
	make DESTDIR="$pkgdir" test-only \
		${_skip:+CI_SKIP_TESTS="$_skip"}
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="c85cf4a94a0dccdcf358a3e0383499fe1fd74ac0e7b6aa888e9524c070ae8be68b9f718c8c0940d51115bbc908202cd7819e370507b7191facd375a5be231c69  node-v16.15.0.tar.xz"