# Contributor: William Pitcock # Contributor: Jose-Luis Rivas # Contributor: Jakub Jirutka # Maintainer: Eivind Uggedal 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.9.2 pkgrel=0 pkgdesc="JavaScript runtime built on V8 engine - LTS 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" 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 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 } dev() { provides="nodejs-lts-dev=$pkgver" # for backward compatibility default_dev } md5sums="b9e6bd6eddb78f34becfa891d60071d8 node-v6.9.2.tar.gz 14ce8e0fb44d5bf75974026900e0d8c2 use-system-ca-certs.patch 5d99a53ef07e15fe882d449ed995bd91 dont-run-gyp-files-for-bundled-deps.patch" sha256sums="997121460f3b4757907c2d7ff68ebdbf87af92b85bf2d07db5a7cb7aa5dae7d9 node-v6.9.2.tar.gz fcd2becd2cb9a62537ae11f51f448fd1061aaae17835bb0f2d2aa71bdf9652c0 use-system-ca-certs.patch c20a62b9dd64591b91a0c1dae649ac04cf7aec402672b349f8daa04f2a08a77b dont-run-gyp-files-for-bundled-deps.patch" sha512sums="236f5e45745e0f4088c24f8a3fb67a2312def143d3b6f0e812a274f179e2ee977e15cc1485aa953592786105d2a319064bc19dd14e3867683d1549e8d39f6cd8 node-v6.9.2.tar.gz c540878495761f4c38f3cccd61da75fa5619637ba9887b7946964a7cef790178e26678fe0aabe400e32c8f0f65e97a519ceee1534bbf18a1a14bc6e9fe067637 use-system-ca-certs.patch a8be538158b7c96341a407acba30450ddc5c3ad764e7efe728d1ceff64efc3067b177855b9ef91b54400be6a02600d83da4c21a07ae9d7dc0774f92b2006ea8b dont-run-gyp-files-for-bundled-deps.patch"