mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
111 lines
3.2 KiB
Plaintext
111 lines
3.2 KiB
Plaintext
# Contributor: William Pitcock <nenolod@dereferenced.org>
|
|
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Contributor: Dave Esaias <dave@containership.io>
|
|
# Contributor: Tadahisa Kamijo <kamijin@live.jp>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
#
|
|
# secfixes:
|
|
# 8.11.0-r0:
|
|
# - CVE-2018-7158
|
|
# - CVE-2018-7159
|
|
# - CVE-2018-7160
|
|
# 8.9.3-r0:
|
|
# - CVE-2017-15896
|
|
# - CVE-2017-15897
|
|
# 6.11.5-r0:
|
|
# - CVE-2017-14919
|
|
# 6.11.1-r0:
|
|
# - CVE-2017-1000381
|
|
#
|
|
pkgname=nodejs
|
|
# Note: Update only to even-numbered versions (e.g. 6.y.z, 8.y.z)!
|
|
# Odd-numbered versions are supported only for 9 months by upstream.
|
|
pkgver=8.11.2
|
|
pkgrel=0
|
|
pkgdesc="JavaScript runtime built on V8 engine - LTS version"
|
|
url="https://nodejs.org/"
|
|
arch="all"
|
|
license="MIT"
|
|
depends="ca-certificates"
|
|
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 c-ares-dev"
|
|
subpackages="$pkgname-dev $pkgname-doc $pkgname-npm::noarch"
|
|
provides="nodejs-lts=$pkgver" # for backward compatibility
|
|
replaces="nodejs-current nodejs-lts" # nodejs-lts for backward compatibility
|
|
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
|
|
dont-run-gyp-files-for-bundled-deps.patch"
|
|
builddir="$srcdir/node-v$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# 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 \
|
|
--shared-cares \
|
|
--openssl-use-def-ca-store
|
|
|
|
# We need run mksnapshot at build time so paxmark it early.
|
|
make -C out mksnapshot BUILDTYPE=Release
|
|
paxmark -m out/Release/mksnapshot
|
|
make
|
|
|
|
# paxmark so JIT works
|
|
paxmark -m out/Release/node
|
|
}
|
|
|
|
# TODO Run provided test suite.
|
|
check() {
|
|
cd "$builddir"/out/Release
|
|
|
|
./node -e 'console.log("Hello, world!")'
|
|
./node -e "require('assert').equal(process.versions.node, '$pkgver')"
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# It's strange, but it really needs to be paxmarked again...
|
|
paxmark -m "$pkgdir"/usr/bin/node
|
|
|
|
cp -pr "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share
|
|
local d; for d in doc html man; do
|
|
rm -r "$pkgdir"/usr/lib/node_modules/npm/$d
|
|
done
|
|
}
|
|
|
|
dev() {
|
|
provides="nodejs-lts-dev=$pkgver" # for backward compatibility
|
|
default_dev
|
|
}
|
|
|
|
npm() {
|
|
pkgdesc="A package manager for JavaScript"
|
|
depends="$pkgname"
|
|
provides="nodejs-current-npm" # for backward compatibility
|
|
replaces="nodejs-current-npm $pkgname" # $pkgname for backward compatibility
|
|
|
|
mkdir -p "$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/bin/np[mx] "$subpkgdir"/usr/bin/
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib/node_modules
|
|
mv "$pkgdir"/usr/lib/node_modules/npm "$subpkgdir"/usr/lib/node_modules/
|
|
}
|
|
|
|
sha512sums="d794a988c1b0ad329d72d20058af11722c4688912fa92ac2feab74c60ca7b8c7e7798ee22427fd9af6ea26e17b81a45f27b2c0fefad0a6d4e89992cd167cfcc4 node-v8.11.2.tar.gz
|
|
ba95f21b1e80717ef63941854e7ed412f64a91da068c0dbf0d6d9697333ee266c9f4cd7bf1a01111eeb28aa66adefd8a58cfb3e82debb84b43e35e9dc914dd36 dont-run-gyp-files-for-bundled-deps.patch"
|