# Template file for 'google-fonts-ttf'
pkgname=google-fonts-ttf
version=20210628
revision=1
_githash=90395889ed44cbd1bce429834020bb81c4d6e88b
wrksrc="fonts-${_githash}"
# Those fonts were provided by google-fonts-ttf
depends="font-util cantarell-fonts noto-fonts-ttf
 amiri-font fonts-croscore-ttf font-b612 font-fira-ttf
 font-ibm-plex-ttf font-manjari font-material-design-icons-ttf
 fonts-roboto-ttf font-vollkorn-ttf ttf-ubuntu-font-family"
short_desc="TrueType fonts from the Google Fonts project"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0, OFL-1.1"
homepage="https://www.google.com/fonts"
distfiles="https://github.com/google/fonts/archive/${_githash}.tar.gz"
checksum=e60f6e4f72bd5f236d299768212ddfa8cd7e149122afed0a9fde551b6ac3415c
font_dirs="/usr/share/fonts/TTF"

do_install() {
	vmkdir usr/share/fonts/TTF
	find ofl -type f -name '*.ttf' -exec install -Dm644 '{}' ${DESTDIR}/usr/share/fonts/TTF \;
	cd "$DESTDIR"
	sed -n 's,^[a-z].*	/,,p' "$FILESDIR/dup"*.lst | xargs rm -f
	cd "$wrksrc"
}
