# Contributor: William Pitcock # Maintainer: Eivind Uggedal pkgname=nodejs pkgver=0.12.7 pkgrel=0 pkgdesc='Evented I/O for V8 javascript' url='http://nodejs.org/' arch='all' license='MIT' makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev c-ares-dev \ paxmark libuv-dev linux-headers" subpackages="$pkgname-dev $pkgname-doc" source="http://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 make -C out BUILDTYPE=Release mksnapshot || return 1 paxmark -m out/Release/mksnapshot || return 1 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="5523ec4347d7fe6b0f6dda1d1c7799d5 node-v0.12.7.tar.gz" sha256sums="b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d node-v0.12.7.tar.gz" sha512sums="0c9cb7542530463e7703435c8d819949785c1c6497c6d98f9854ca615fe33a62f451833e856f0159b836a698b4dee5d165fa505bad5d474f664e1533090d8606 node-v0.12.7.tar.gz"