Commit 4eece32c authored by Jakub Jirutka's avatar Jakub Jirutka

main/nodejs: improve abuild and take maintainership

Eivind Uggedal is not active for a long time.
parent 3c99a425
......@@ -3,12 +3,12 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Dave Esaias <dave@containership.io>
# Contributor: Tadahisa Kamijo <kamijin@live.jp>
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
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=6.11.1
pkgrel=1
pkgrel=2
pkgdesc="JavaScript runtime built on V8 engine - LTS version"
url="http://nodejs.org/"
arch="all"
......@@ -27,7 +27,7 @@ source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
builddir="$srcdir/node-v$pkgver"
prepare() {
default_prepare || return 1
default_prepare
# Remove bundled dependencies that we're not using.
rm -rf deps/http_parser deps/openssl deps/uv deps/zlib
......@@ -42,13 +42,12 @@ build() {
--shared-openssl \
--shared-http-parser \
--shared-cares \
--openssl-use-def-ca-store \
|| return 1
--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 || 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
# paxmark so JIT works
paxmark -m out/Release/node
......@@ -65,21 +64,21 @@ check() {
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
make DESTDIR="$pkgdir" install
# It's strange, but it really needs to be paxmarked again...
paxmark -m "$pkgdir"/usr/bin/node || return 1
paxmark -m "$pkgdir"/usr/bin/node
cp -pr "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share || return 1
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 || return 1
rm -r "$pkgdir"/usr/lib/node_modules/npm/$d
done
}
dev() {
provides="nodejs-lts-dev=$pkgver" # for backward compatibility
default_dev || return 1
default_dev
# Remove some junk.
rm -r "$subpkgdir"/usr/lib/node_modules
......@@ -92,7 +91,7 @@ npm() {
replaces="nodejs-current-npm $pkgname" # $pkgname for backward compatibility
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/npm "$subpkgdir"/usr/bin/ || return 1
mv "$pkgdir"/usr/bin/npm "$subpkgdir"/usr/bin/
mkdir -p "$subpkgdir"/usr/lib/node_modules
mv "$pkgdir"/usr/lib/node_modules/npm "$subpkgdir"/usr/lib/node_modules/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment