void-packages/srcpkgs/nerd-fonts/template

60 lines
1.8 KiB
Bash

# Template file for 'nerd-fonts'
pkgname=nerd-fonts
version=3.0.2
revision=2
depends="nerd-fonts-ttf nerd-fonts-otf"
short_desc="Iconic font aggregator, collection and patcher"
maintainer="cinerea0 <cinerea0@protonmail.com>"
license="MIT"
homepage="https://nerdfonts.com"
changelog="https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/changelog.md"
distfiles="https://github.com/ryanoasis/nerd-fonts/archive/refs/tags/v${version}.tar.gz"
checksum=3b18b305451b0b22cb6484197f8029efe54e5c459e8ed3adbb0fb1697c0c13a6
do_install() {
vmkdir usr/share/fonts/NerdFonts/otf
vmkdir usr/share/fonts/NerdFonts/ttf
vmkdir usr/lib/NerdFonts
# get all patched fonts
find patched-fonts -name '*.otf' -exec install -Dm644 '{}' "${DESTDIR}/usr/share/fonts/NerdFonts/otf" \;
find patched-fonts -name '*.ttf' -exec install -Dm644 '{}' "${DESTDIR}/usr/share/fonts/NerdFonts/ttf" \;
rm "${DESTDIR}"/usr/share/fonts/NerdFonts/ttf/SymbolsNerdFont*.ttf
# install patching scripts
for sh in bin/scripts/lib/i_*.sh; do
vinstall "$sh" 744 usr/lib/NerdFonts
done
vlicense LICENSE
}
nerd-fonts-symbols-ttf_package() {
short_desc+=" - TTF symbols-only font"
font_dirs="/usr/share/fonts/NerdFonts/ttf/symbols"
depends="font-util"
pkg_install() {
vmkdir usr/share/fonts/NerdFonts/ttf/symbols
vcopy "patched-fonts/NerdFontsSymbolsOnly/*.ttf" usr/share/fonts/NerdFonts/ttf/symbols
vinstall 10-nerd-font-symbols.conf 644 usr/share/fontconfig/conf.avail
}
}
nerd-fonts-otf_package() {
short_desc+=" - OTF fonts"
font_dirs="/usr/share/fonts/NerdFonts/otf"
depends="font-util"
pkg_install() {
vmove usr/share/fonts/NerdFonts/otf
}
}
nerd-fonts-ttf_package() {
short_desc+=" - TTF fonts"
font_dirs="/usr/share/fonts/NerdFonts/ttf"
depends="font-util nerd-fonts-symbols-ttf"
pkg_install() {
vmove usr/share/fonts/NerdFonts/ttf
}
}