# Template file for 'grub-terminus'
pkgname=grub-terminus
version=0.3
revision=1
hostmakedepends="grub-utils terminus-font"
short_desc="Terminus bold fonts for GRUB"
maintainer="Orphaned <orphan@voidlinux.org>"
license="OFL-1.1, GPL-2.0-or-later"
homepage="https://voidlinux.org"

do_install() {
	local _sizes="12 14 16 18 20 22 24 28 32"
	vmkdir boot/grub/fonts
	for s in ${_sizes}; do
		msg_normal "Converting Terminus Bold ${s} font...\n"
		grub-mkfont -o ${DESTDIR}/boot/grub/fonts/terminus${s}.pf2 \
			--verbose /usr/share/fonts/X11/misc/ter-x${s}b.pcf.gz
	done
	vmkdir usr/bin
	sed ${FILESDIR}/grub-terminus.template \
		-e "s;@sizes@;${_sizes};" \
		> ${DESTDIR}/usr/bin/grub-terminus
	chmod o+x ${DESTDIR}/usr/bin/grub-terminus
	# Copy the OFL.txt license from the original terminus-font
	vlicense /usr/share/licenses/terminus-font/OFL.txt
}
