SUMMARY="Node dependency management"
DESCRIPTION="Fast, reliable, and secure dependency management."
HOMEPAGE="https://classic.yarnpkg.com"
COPYRIGHT="2016-present, Yarn Contributors"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/yarnpkg/yarn/releases/download/v$portVersion/yarn-v$portVersion.tar.gz"
CHECKSUM_SHA256="267982c61119a055ba2b23d9cf90b02d3d16c202c03cb0c3a53b9633eae37249"
SOURCE_DIR="yarn-v$portVersion"

ARCHITECTURES="any"

PROVIDES="
	yarn = $portVersion
	cmd:yarn = $portVersion
	cmd:yarnpkg = $portVersion
	"
REQUIRES="
	cmd:node
	"

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

	ln -sr $libDir/node_modules/yarn/bin/yarn.js $prefix/bin/yarn
	ln -sr $libDir/node_modules/yarn/bin/yarn.js $prefix/bin/yarnpkg
}
