aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorEd Robinson <ed.robinson@reevoo.com>2017-03-06 13:42:44 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-03-07 23:41:50 +0100
commitbdb933cb8a0b7f95141df198f1ebf70827e99ff4 (patch)
tree81706dd2398097249367a891fa7fab66e2fc8edd /main
parent31db0dbe14438c8164f04f00cea6c078ee8fec1d (diff)
downloadaports-bdb933cb8a0b7f95141df198f1ebf70827e99ff4.tar.bz2
aports-bdb933cb8a0b7f95141df198f1ebf70827e99ff4.tar.xz
main/nodejs: move npm to subpackage
Diffstat (limited to 'main')
-rw-r--r--main/nodejs/APKBUILD16
1 files changed, 14 insertions, 2 deletions
diff --git a/main/nodejs/APKBUILD b/main/nodejs/APKBUILD
index a667ad8c5a..3327a9c212 100644
--- a/main/nodejs/APKBUILD
+++ b/main/nodejs/APKBUILD
@@ -8,7 +8,7 @@ pkgname=nodejs
# Note: Update only to even-numbered versions (e.g. 6.y.z, 8.y.z)!
# Odd-numbered versions are supported only for 9 months by upstream.
pkgver=6.9.5
-pkgrel=0
+pkgrel=1
pkgdesc="JavaScript runtime built on V8 engine - LTS version"
url="http://nodejs.org/"
arch="all"
@@ -18,7 +18,7 @@ depends_dev="libuv"
# gold is needed for mksnapshot
makedepends="$depends_dev python2 openssl-dev zlib-dev libuv-dev linux-headers
paxmark binutils-gold http-parser-dev ca-certificates"
-subpackages="$pkgname-dev $pkgname-doc"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-npm::noarch"
provides="nodejs-lts=$pkgver" # for backward compatibility
replaces="nodejs-current nodejs-lts" # nodejs-lts for backward compatibility
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
@@ -70,6 +70,18 @@ dev() {
default_dev
}
+npm() {
+ pkgdesc="A package manager for JavaScript"
+ depends="$pkgname"
+ replaces="nodejs-current-npm $pkgname" # $pkgname for backward compatibility
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/npm "$subpkgdir"/usr/bin/ || return 1
+
+ mkdir -p "$subpkgdir"/usr/lib/node_modules
+ mv "$pkgdir"/usr/lib/node_modules/npm "$subpkgdir"/usr/lib/node_modules/
+}
+
md5sums="a2a820b797fb69ffb259b479c7f5df32 node-v6.9.5.tar.gz
14ce8e0fb44d5bf75974026900e0d8c2 use-system-ca-certs.patch
5d99a53ef07e15fe882d449ed995bd91 dont-run-gyp-files-for-bundled-deps.patch"