# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>

_realname=neovim
pkgbase=mingw-w64-nodejs-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-nodejs-${_realname}"
pkgver=5.4.0
pkgrel=1
pkgdesc='Nvim Node.js client and plugin host (mingw-w64)'
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://neovim.io/node-client/'
msys2_repository_url='https://github.com/neovim/node-client'
msys2_changelog_url='https://github.com/neovim/node-client/blob/master/CHANGELOG.md'
msys2_references=(
  'purl: pkg:npm/neovim'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('0f28cc0f83a9ab714627398fca7164614348c3aa53cdf57f1e79fbfeda3418a8')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  "${MINGW_PREFIX}"/bin/npm install -g \
    --cache "${srcdir}/npm-cache" \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${srcdir}/${_realname}-${pkgver}.tgz"
}
