Subject: [alpine-aports] [PATCH] testing/nodejs-stable: new aport

From: Jose-Luis Rivas <[email-masked]>
Date: Mon, 29 Feb 2016 14:09:42 -0500

We have the LTS release on main/nodejs and the new features are being
added to the stable release which is at v5.7.0 (vs v4.3.1 for LTS).

There's a replace against nodejs so there's no conflicts when someone
tries to install them together.
---
 testing/nodejs-stable/APKBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 testing/nodejs-stable/APKBUILD

diff --git a/testing/nodejs-stable/APKBUILD b/testing/nodejs-stable/APKBUILD
new file mode 100644
index 0000000..79bd31f
--- /dev/null
+++ b/testing/nodejs-stable/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Jose-Luis Rivas <[email-masked]>
+pkgname=nodejs-stable
+pkgver=5.7.0
+pkgrel=0
+pkgdesc='Evented I/O for V8 javascript'
+url='https://nodejs.org/'
+arch='all'
+license='MIT'
+makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev
+	linux-headers binutils-gold paxmark"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz"
+replaces="nodejs"
+_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="8ab282434c79bedcfd20c0b74f66e38e  node-v5.7.0.tar.gz"
+sha256sums="2338b46a2f45fbb747089c66931f62555f25a5928511d3a43bbb3a39dcded2d8  node-v5.7.0.tar.gz"
+sha512sums="82ff8d6339c0b065684f02f79bb739365eda3110f8e69e9296453eb5a63584c978d93c87d8ef2350498abaa7b16cabfa62954dce401e82730cac61d6af62f8fe  node-v5.7.0.tar.gz"
-- 
2.7.2

-- 
⨳ PGP 0x13EC43EEB9AC8C43 ⨳ https://ghostbar.co