pkgname=noto
pkgver=20251101
_commit="7eb462dbfc5fe79b18ea35e7f1773f9495b8a1c6"
pkgdesc='Google Noto TTF fonts'
arch=(any)
homepage='https://fonts.google.com/noto'
license=(OFL-1.1-no-RFN)
_fontconfs=("66-noto-serif.conf"
  "66-noto-mono.conf"
  "66-noto-sans.conf"
)
_fontconf_sums=("e99b33ffbf57d7a7d277acea0a0ce910"
  "7d7b0c67b955d9ebc5ceb9e002126706"
  "d1c1f1fdd1ee428b9317de9e639d7544"
)
sources=("${pkgname}-${pkgver}.tar.gz"
  ${_fontconfs[@]}
)
urls=("https://github.com/notofonts/notofonts.github.io/archive/${_commit}.tar.gz"
  ${_fontconfs[@]}
)
md5sums=("026d82cecb9f9f89fce7d6741ef45f3f"
  ${_fontconf_sums[@]}
)

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_install() {
  install -vDm644 fonts/*/hinted/ttf/*.tt[fc] -t "$pkgdir"/usr/share/fonts/${pkgname}
  install -vDm644 LICENSE -t "$pkgdir"/usr/share/licenses/noto-fonts

  for _f in ${_fontconfs[@]}; do
    install -vDm644 "${filedir}/${_f}" -t "${pkgdir}/etc/fonts/conf.avail"
  done
}

# vim:ft=sh syn=sh et sw=2:
