# Description: a nodejs package manager
# URL: https://classic.yarnpkg.com/lang/en/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: nodejs

name=yarn
version=1.22.19
release=1
source=(https://github.com/yarnpkg/yarn/releases/download/v$version/yarn-v$version.tar.gz)

build() {
  cd $name-v$version
  install -dm755  $PKG/usr/lib/node_modules/yarn
  cp -R * $PKG/usr/lib/node_modules/yarn

  install -dm755 $PKG/usr/bin
  ln -s /usr/lib/node_modules/yarn/bin/yarn.js $PKG/usr/bin/yarn
  ln -s /usr/lib/node_modules/yarn/bin/yarn.js $PKG/usr/bin/yarnpkg
}
