archrelease: copy trunk to community-any
[arch-community.git] / nodejs-lts-fermium / trunk / PKGBUILD
blob9a479e6f4f384c3e2d6107a166af2daec2d56bf8
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Felix Yan <felixonmars@archlinux.org>
4 pkgname=nodejs-lts-fermium
5 pkgver=14.21.3
6 pkgrel=1
7 pkgdesc="Evented I/O for V8 javascript (LTS release: Fermium)"
8 arch=(x86_64)
9 url="https://nodejs.org/"
10 license=(MIT)
11 depends=(openssl-1.1 zlib icu libuv c-ares brotli libnghttp2) # http-parser
12 makedepends=(python procps-ng)
13 checkdepends=(openssl) # for openssl s_client
14 optdepends=('npm: nodejs package manager')
15 provides=("nodejs=$pkgver")
16 conflicts=(nodejs)
17 source=(${url}/dist/v${pkgver}/node-v${pkgver}.tar.xz
18         ${pkgname}-openssl3-fix-test-tls-no-sslv3.patch::https://github.com/nodejs/node/commit/0828a96c10d1.patch
19         fix-test-tls-session-cache.patch
20         icu72.patch
21         libnghttp1.45.1_compat.patch)
22 # https://nodejs.org/download/release/latest-fermium/SHASUMS256.txt.asc
23 sha256sums=('458ec092e60ad700ddcf079cb63d435c15da4c7bb3d3f99b9a8e58a99e54075e'
24             'bb5f91aeb0f87e7bcbed531fe8922beec1b51bd2ceeec91e9d25ede800817459'
25             'f38518f306f1a62e0cd04ec2607fb6733ff95ad4090acb07fa091dfd002985c6'
26             '886d0edf868c39567124937f93a43fb3e92fa65b5244b8c608d6482ed217fa56'
27             '81f8a060b40786c02de400620da4060483d910fe7a6b68d8328f3747caf54619')
28 validpgpkeys=(C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8  # Myles Borins <mylesborins@google.com>
29               77984A986EBC2AA786BC0F66B01FBB92821C587A  # Gibson Fahnestock <gibfahn@gmail.com>
30               B9AE9905FFD7803F25714661B63B535A4C206CA9  # Evan Lucas <evanlucas@me.com>
31               DD8F2338BAE7501E3DD5AC78C273792F7D83545D  # Rod Vagg <rod@vagg.org>
32               B9E2F5981AA6E0CD28160D9FF13993A75599653C  # Shelley Vohr <shelley.vohr@gmail.com>
33               4ED778F539E3634C779C87C6D7062848A1AB005C  # Beth Griggs <Bethany.Griggs@uk.ibm.com>
34               C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C  # Richard Lau <rlau@redhat.com>
35               74F12602B6F1C4E913FAA37AD3A89613643B6201) # Danielle Adams <adamzdanielle@gmail.com>
37 prepare() {
38   cd node-v${pkgver}
39   patch -p1 < ../${pkgname}-openssl3-fix-test-tls-no-sslv3.patch
40   patch -p0 < ../fix-test-tls-session-cache.patch
41   patch -p1 < ../icu72.patch
42   patch -p1 < ../libnghttp1.45.1_compat.patch
44   # This test fails in .2 and in .3, disable it for now.
45   rm test/sequential/test-net-bytes-per-incoming-chunk-overhead.js
48 build() {
49   cd node-v${pkgver}
50   CPPFLAGS+=" -I/usr/include/openssl-1.1" LDFLAGS+=" -L/usr/lib/openssl-1.1"
52   ./configure \
53     --prefix=/usr \
54     --with-intl=system-icu \
55     --without-npm \
56     --shared-openssl \
57     --shared-zlib \
58     --shared-libuv \
59     --experimental-http-parser \
60     --shared-cares \
61     --shared-brotli \
62     --shared-nghttp2
63     # --shared-v8
64     # --shared-http-parser
66   make
69 check() {
70   cd node-v${pkgver}
71   make test-only
74 package() {
75   cd node-v${pkgver}
76   LDFLAGS+=" -L/usr/lib/openssl-1.1" # not sure why it gets reset in package()
77   make DESTDIR="${pkgdir}" install
78   install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/