_realname=qwen-code
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.5.0
pkgrel=1
pkgdesc="A powerful command-line AI workflow tool adapted from Gemini CLI, specifically optimized for Qwen3-Coder models. (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/QwenLM/qwen-code"
license=('Apache-2.0')
depends=(${MINGW_PACKAGE_PREFIX}-nodejs)
source=("https://registry.npmjs.org/@qwen-code/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('5ecf7c508ff5a8a36f9d1fb257aaebe01b6e91d7a45fd217dd7172a360905981')
noextract=("${_realname}-${pkgver}.tgz")
msys2_references=(
  "aur: qwen-code"
  "purl: pkg:npm/@qwen-code/${_realname}"
)

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