# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>

_realname=arrpc
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.6.0
pkgrel=1
pkgdesc='Open Discord RPC server for atypical setups (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://arrpc.openasar.dev'
msys2_repository_url='https://github.com/OpenAsar/arRPC'
msys2_changelog_url='https://github.com/OpenAsar/arrpc/blob/main/changelog.md'
msys2_references=(
  'aur: arrpc'
  'purl: pkg:npm/arrpc'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
options=('!strip')
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('d42d609b939287e56657cada00f4075652486583a6ea63c24009e4b255a6dc4e')
noextract=("${_realname}-${pkgver}.tgz")

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