# Contributor: William Pitcock # Maintainer: Eivind Uggedal pkgname=nodejs pkgver=4.0.0 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 linux-headers paxmark" 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 || 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="2c1a6100084893c21e895e100b276af7 node-v4.0.0.tar.gz" sha256sums="e110e5a066f3a6fe565ede7dd66f3727384b9b5c5fbf46f8db723d726e2f5900 node-v4.0.0.tar.gz" sha512sums="2f2421115d2d674204fa8db30be941843b1e2bd56980590a250f374f1c2d2a46737496a3700c25445d241f71497813ac98a91469ff4befc59df8e3d8e673f951 node-v4.0.0.tar.gz"