SUMMARY="A JavaScript package manager"
DESCRIPTION="npm is a JavaScript package manager for Nodejs."
HOMEPAGE="https://npmjs.com"
COPYRIGHT="2016-present, npm, Inc. and Contributors"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/npm/cli/archive/v$portVersion.tar.gz"
SOURCE_DIR="cli-$portVersion"
CHECKSUM_SHA256="bf84632ac3299df593250bc25a7af8ec64c43d683190dddaab43dd779b51dbe1"

ARCHITECTURES="x86_64 !x86_gcc2"

PROVIDES="
	npm = $portVersion
	cmd:npm = $portVersion
	cmd:npx = $portVersion
	"
REQUIRES="
	cmd:node
	"

INSTALL()
{
	mkdir -p $libDir/node_modules/npm $prefix/bin
	cp -R * $libDir/node_modules/npm

	ln -sr $libDir/node_modules/npm/bin/npm-cli.js $prefix/bin/npm
	ln -sr $libDir/node_modules/npm/bin/npx-cli.js $prefix/bin/npx
}
