# Maintainer: Jose-Luis Rivas pkgname=nodejs pkgver=6.3.0 pkgrel=0 pkgdesc='Evented I/O for V8 javascript' url='http://nodejs.org/' arch='all' license='MIT' # gold is needed for mksnapshot makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev linux-headers paxmark binutils-gold" subpackages="$pkgname-dev $pkgname-doc" replaces="nodejs-lts" source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz" _builddir="$srcdir"/node-v$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure --prefix=/usr \ --shared-zlib \ --shared-libuv \ --shared-openssl \ || 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() { local d 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 for d in doc html man; do rm -r "$pkgdir"/usr/lib/node_modules/npm/$d || return 1 done } md5sums="8c14e5c89d66d4d060c91b3ba15dfd31 node-v6.3.0.tar.gz" sha256sums="4ed7a99985f8afee337cc22d5fef61b495ab4238dfff3750ac9019e87fc6aae6 node-v6.3.0.tar.gz" sha512sums="12f73f160bb2cb735d0ec95e757a48e6d9e808df10367eb339c9f6ae2375499fb9d54351ce2d6100b06b29e35e1a9cce650d4c2232f8aca8eefadb3b7039d9b5 node-v6.3.0.tar.gz"