pkgname=noto-emoji
pkgver=20250912
_commit="8998f5dd683424a73e2314a8c1f1e359c19e8742"
_commit_mc="b80db438fe644bd25e0032661ab66fa72f2af0e2"
pkgdesc='Google Noto Color Emoji font'
arch=(any)
homepage='https://www.google.com/get/noto/'
license=(OFL-1.1-no-RFN)
_fontconfs=("75-noto-emoji-fallback.conf")
_fontconf_sums=("4f1ecb8bbad064885a02a8bd5d6a4a32")
sources=("${pkgname}-${pkgver}.tar.gz"
  "${pkgname}-${pkgver}-monochrome.tar.gz"
  ${_fontconfs[@]}
)
urls=("https://github.com/googlefonts/noto-emoji/archive/${_commit}.tar.gz"
  "https://github.com/zjaco13/Noto-Emoji-Monochrome/archive/${_commit_mc}.tar.gz"
  ${_fontconfs[@]}
)
md5sums=("a75b88f15a3f41c221666451f510c33f"
  "d8c27c1159e275472ed0c1c1b9c90636"
  ${_fontconf_sums[@]}
)

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

src_install() {
  install -vDm644 fonts/NotoColorEmoji.ttf -t "${pkgdir}/usr/share/fonts/${pkgname}"
  install -vDm644 Noto-Emoji-Monochrome-${_commit_mc}/fonts/*.ttf "${pkgdir}/usr/share/fonts/${pkgname}"

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

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