# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

_realname=adobe-source-code-pro-fonts
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.042u+1.062i+1.026vf
_relver=2.042R-u/1.062R-i/1.026R-vf
pkgrel=1
pkgdesc="Monospaced font family for user interface and coding environments (mingw-w64)"
arch=(any)
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://adobe-fonts.github.io/source-code-pro/"
msys2_repository_url="https://github.com/adobe-fonts/source-code-pro"
license=(spdx:OFL-1.1)
_tarname=source-code-pro-${_relver//\//-}
source=("https://github.com/adobe-fonts/source-code-pro/archive/${_relver}/${_tarname}.tar.gz"
        https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Roman.otf
        https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Italic.otf)
sha256sums=('19d2c07eff0d91927c47a482c38e591ba855664fc65440006fb65d0157841249'
            'af8fdd265f6208816fde44062a27b79ce2a594ded44ea96055a1655b6869992d'
            'b2ca3a3c1fe0701ad74aa7c66c37972d07b1237197a816a1a5646c7e42a11353')

package() {
  cd "${_tarname}"
  install -d "${pkgdir}${MINGW_PREFIX}/share/fonts/${_realname%-fonts}"
  install -t "${pkgdir}${MINGW_PREFIX}/share/fonts/${_realname%-fonts}" -m644 OTF/*.otf ../*.otf
  install -Dm644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md"
}
