# Contributor: William Pitcock # Maintainer: Eivind Uggedal pkgname=nodejs pkgver=4.1.2 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="97b2a3ff97a18745a402ba9fdd5da33d node-v4.1.2.tar.gz" sha256sums="febec3703a3fea9b64c46100a7b6a4408250027aa8259a2a815fd2275d502c49 node-v4.1.2.tar.gz" sha512sums="bf065630bc12b431e5c714898523111899b345120d3f40b441ef632ac3037006007418d2dd69bf9faa3176604600ae87b0d2b9b9dc66321a18705aae4573c705 node-v4.1.2.tar.gz"