diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2020-07-12 00:18:12 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2020-07-19 23:14:28 -0400 |
commit | d47122d207c5077dc038ea3f9d50ef6a4dfa1e0b (patch) | |
tree | 1d9b4d741c5ae017aaf406d4d5e90abde23fcc12 /pcr/ttf-fonts-meta | |
parent | 2d8b2b7cc39b80ab6f9fdbb21cda598e7cb71792 (diff) | |
download | abslibre-d47122d207c5077dc038ea3f9d50ef6a4dfa1e0b.tar.gz abslibre-d47122d207c5077dc038ea3f9d50ef6a4dfa1e0b.tar.bz2 abslibre-d47122d207c5077dc038ea3f9d50ef6a4dfa1e0b.zip |
[ttf-fonts-meta]: re-work to collect font packages automatically
Diffstat (limited to 'pcr/ttf-fonts-meta')
-rw-r--r-- | pcr/ttf-fonts-meta/PKGBUILD | 52 | ||||
-rw-r--r-- | pcr/ttf-fonts-meta/ttf-fonts-meta.install | 6 |
2 files changed, 40 insertions, 18 deletions
diff --git a/pcr/ttf-fonts-meta/PKGBUILD b/pcr/ttf-fonts-meta/PKGBUILD index 2fcc23135..560b83b43 100644 --- a/pcr/ttf-fonts-meta/PKGBUILD +++ b/pcr/ttf-fonts-meta/PKGBUILD @@ -1,23 +1,43 @@ # Maintainer: David P. <megver83@parabola.nu> +# Contributor: bill-auger <bill-auger@programmer.net> + + +# 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=20190715 +pkgver=$(date +%Y%m%d) pkgrel=1 -pkgdesc='Metapackage that installs all available fonts' +pkgdesc="Metapackage that installs all available fonts (approx: 1GB)" arch=(any) -url='https://www.parabola.nu/' +url=https://www.parabola.nu/ license=(GPL) -install=$pkgname.install -depends=(ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-bitstream-vera ttf-dejavu noto-fonts-extra - ttf-indic-otf ttf-junicode ttf-khmer ttf-linux-libertine ttf-sazanami ttf-croscore - ttf-tibetan-machine ttf-anonymous-pro ttf-droid ttf-hanazono ttf-inconsolata ttf-ionicons - ttf-liberation ttf-linux-libertine-g otf-overpass ttf-roboto ttf-font-awesome ttf-comic-neue - ttf-free-comic-font ttf-gentium-plus ttf-pfc xorg-fonts-100dpi xorg-fonts-75dpi noto-fonts-emoji ttf-lato - xorg-fonts-type1 adobe-source-code-pro-fonts adobe-source-sans-pro-fonts adobe-source-serif-pro-fonts - cantarell-fonts font-bitstream-speedo gnu-free-fonts gsfonts noto-fonts noto-fonts-cjk ttf-montserrat - tex-gyre-fonts otf-fira-mono otf-fira-sans opendesktop-fonts ttf-beteckna ttf-caladea ttf-carlito - ttf-cormorant ttf-fantasque-sans-mono ttf-fira-code ttf-fira-mono ttf-fira-sans ttf-ibm-plex ttf-opensans) - -pkgver() { - date +%Y%m%d + +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[@]}" } diff --git a/pcr/ttf-fonts-meta/ttf-fonts-meta.install b/pcr/ttf-fonts-meta/ttf-fonts-meta.install index b5c401b2b..e01ffbe70 100644 --- a/pcr/ttf-fonts-meta/ttf-fonts-meta.install +++ b/pcr/ttf-fonts-meta/ttf-fonts-meta.install @@ -1,7 +1,9 @@ pre_install() { cat <<EOM - If you noted that a font package was not installed after you got ttf-fonts-meta, - please report it to mailto:dev@lists.parabola.nu + If you noted that a font package was not installed with 'ttf-fonts-meta', + or if 'ttf-fonts-meta' installed a package that was not a font, + please report it on the bug tracker: <https://labs.parabola.nu>, + or send email to: <dev@lists.parabola.nu> EOM } |