# Contributor: Jakub Jirutka # Maintainer: Jose-Luis Rivas pkgname=nodejs-current # The current stable version, i.e. non-LTS. pkgver=7.5.0 pkgrel=0 pkgdesc="JavaScript runtime built on V8 engine - current stable version" url="http://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" subpackages="$pkgname-dev $pkgname-doc" provides="nodejs" replaces="nodejs 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 || return 1 # 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 \ --openssl-use-def-ca-store \ || 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 } md5sums="8b648e7f83ec6f1aa52b3e3b87999761 node-v7.5.0.tar.gz 5b1b27a33063602990f5495d3b01b587 dont-run-gyp-files-for-bundled-deps.patch" sha256sums="0da8e0288b5c0f136e650b7119219968720caf88b5a67ef0591555113f0844c2 node-v7.5.0.tar.gz 6886ee83f76eb68dc948da844e548f060caf360ca039bb2c1ee7ea0cd2d8dbf3 dont-run-gyp-files-for-bundled-deps.patch" sha512sums="e5f1b37c5d313ca6cc91cb46f49443855d44718599543894f34aad6b921b9fbbc91b8bde720a2e6526d0cdb68ce77f74e1d770dec2b582ad964cd9d1d3c5bfbd node-v7.5.0.tar.gz ba95f21b1e80717ef63941854e7ed412f64a91da068c0dbf0d6d9697333ee266c9f4cd7bf1a01111eeb28aa66adefd8a58cfb3e82debb84b43e35e9dc914dd36 dont-run-gyp-files-for-bundled-deps.patch"