# Template file for 'font-vazirmatn'
pkgname=font-vazirmatn
version=33.003
revision=1
depends="font-util"
short_desc="Persian/Arabic font"
maintainer="Orphaned <orphan@voidlinux.org>"
license="OFL-1.1"
homepage="https://github.com/rastikerdar/vazirmatn"
changelog="https://raw.githubusercontent.com/rastikerdar/vazirmatn/refs/heads/master/CHANGELOG.md"
distfiles="https://github.com/rastikerdar/vazirmatn/releases/download/v${version}/vazirmatn-v${version}.zip"
checksum=0a9afd41967e6f57096a56a181a23f81a2b999b62f1f2a4e4b26736580854fdb
nostrip=yes

do_install() {
	fonts_dir="/usr/share/fonts/vazirmatn"
	vmkdir "$fonts_dir"
	for file in \
		./fonts/ttf/*.ttf \
		./Round-Dots/fonts/ttf/*.ttf \
		./Round-Dots/misc/Farsi-Digits/fonts/ttf/*.ttf \
		./Round-Dots/misc/Farsi-Digits-Non-Latin/fonts/ttf/*.ttf \
		./Round-Dots/misc/Non-Latin/fonts/ttf/*.ttf \
		./Round-Dots/misc/UI/fonts/ttf/*.ttf \
		./Round-Dots/misc/UI-Farsi-Digits-Non-Latin/fonts/ttf/*.ttf \
		./Round-Dots/misc/UI-Non-Latin/fonts/ttf/*.ttf \
		./misc/Farsi-Digits/fonts/ttf/*.ttf \
		./misc/Farsi-Digits-Non-Latin/fonts/ttf/*.ttf \
		./misc/Non-Latin/fonts/ttf/*.ttf \
		./misc/UI/fonts/ttf/*.ttf \
		./misc/UI-Farsi-Digits/fonts/ttf/*.ttf \
		./misc/UI-Farsi-Digits-Non-Latin/fonts/ttf/*.ttf \
		./misc/UI-Non-Latin/fonts/ttf/*.ttf
	do
		vinstall "$file" 644 "$fonts_dir"
	done

	vinstall ${FILESDIR}/conf.avail 644 etc/fonts/conf.avail 60-vazirmatn.conf
	vlicense OFL.txt LICENSE
}

font-vazir_package() {
	metapackage=yes
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - (transitional dummy package)"
}
