# Maintainer: David P. # Contributor: bill-auger # NOTE: Generally, we do not want packaging to be so dynamic # (eg: `date` as 'pkgver', or building from a git branch tip), # such that the package version or contents is inherently not reproducible. # In the case of pure meta-packages like this one though (and package-groups), # reproducibility reduces to that of it's dependencies; and neither # meta-packages nor package-groups should play a role in any dependency chain, # other than the mandatory ones (currently only 'base'). # This dynamic approach is far easier to maintain than an explicit white-list, # which is a highly desirable property; becasue the use-case for installing # 1GB of fonts, seems too small to justify maintenance of this package at all. pkgname=ttf-fonts-meta pkgver=$(date +%Y%m%d) pkgrel=1 pkgdesc="Metapackage that installs all available fonts (approx: 1GB)" arch=(any) url=https://www.parabola.nu/ license=(GPL) depends=() install=${pkgname}.install package() { local repos='(extra|community|pcr)' local filters='(alias|birdfont|fontsel|encodings|mkfontscale|nerd-fonts|ttf-fonts-meta|xlsfonts|xorg-font-util)' local overrides='nerd-fonts' local fonts=$( ( pacman -Ss ^ttf- | grep -E "${repos}/ttf-" ; \ pacman -Ss [^d]fonts | grep -E "${repos}/.*fonts.*" ; \ pacman -Ss fonts$ | grep -E "${repos}/.*font " ; ) | \ sed -E "s!${repos}/([^ ]*) .*!\2!" | \ grep -vE "${filters}" | uniq ) depends+=( ${fonts} ${overrides} ) echo -e "\$fonts found (plus \$overrides):\n${depends[@]}" }