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

_realname=ttf-paratype
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.005
pkgrel=1
pkgdesc='ParaType font family with extended cyrillic and latin character sets (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://company.paratype.com/pt-sans-pt-serif'
license=('custom:OFL')
source=(
  # PT Sans
  'https://company.paratype.com/system/attachments/629/original/ptsans.zip'
  'https://company.paratype.com/system/attachments/632/original/ptsansexpert.zip'
  # PT Serif
  'https://company.paratype.com/system/attachments/634/original/ptserif.zip'
  'https://company.paratype.com/system/attachments/635/original/ptserifexpert.zip'
  # PT Mono
  'https://company.paratype.com/system/attachments/631/original/ptmono.zip'
)
sha256sums=(
  # PT Sans
  '65c3352a864ac711e5381d56dc76ca4edfb511b5293f5560bca877e8f19a2fc9'
  '3fd9b9f7805e7e6af922272d5816da3581b9622ec81046820bfd4abce17a80db'
  # PT Serif
  '7a6f5fd596307a3f1b145c2383f7ae61abc417e7f8d5ba068295ef1c182a7474'
  'b72162d455371c1359be35f5e2ef1e9ca20eaf1a9337c9246afce56d7bfec663'
  # PT Mono
  '741b1457066d69f045ac5196a512c2c1ca7900645b97bcb7280576d34e540af3'
)

package() {
  # Create required directories
  mkdir -p \
    "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF/" \
    "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/"

  # Install font files
  cp "${srcdir}"/*.ttf "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF/"

  # Install licenses
  cp "${srcdir}"/*License*.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/"
}
