diff options
author | D3SOX | 2020-09-23 13:58:59 +0200 |
---|---|---|
committer | D3SOX | 2020-09-23 13:58:59 +0200 |
commit | f5269d3b5ed9bec171d8ba25779ae8a95acdb070 (patch) | |
tree | ef3b46b453fbf890adcea2af4c24a12fc95b03df /PKGBUILD | |
download | aur-f5269d3b5ed9bec171d8ba25779ae8a95acdb070.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..01575554f227 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +pkgname=nerd-fonts-sf-mono +pkgver=1 +pkgrel=1 +pkgdesc="Monospaced variant of San Francisco. Sourced directly from Apple, patched with the Nerd Fonts Patcher" +arch=('any') +url='https://developer.apple.com/fonts/' +license=('custom') +makedepends=('git' 'p7zip' 'python' 'fontforge' 'subversion') +conflicts=('nerd-fonts-sf-mono') +provides=('nerd-fonts-sf-mono') +source=('https://developer.apple.com/design/downloads/SF-Mono.dmg' 'https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/font-patcher' 'svn+https://github.com/ryanoasis/nerd-fonts/trunk/src/glyphs') +sha256sums=('SKIP' 'SKIP' 'SKIP') +# TODO: remove warning and msg since they are only intended for internal use by makepkg. what to use instead? + +build() { + # prepare glyphs so that font-patcher can find them + mkdir -p "$srcdir/src" + ln -sf "$srcdir/glyphs" "$srcdir/src/glyphs" + # extract fonts + cd "$srcdir" + 7z x -y SF-Mono.dmg + 7z x -y "SFMonoFonts/SF Mono Fonts.pkg" + 7z x -y "Payload~" + # patch fonts + mkdir -p "$srcdir/patched" + warning "Now patching all fonts. This will take very long..." + for f in "$srcdir/Library/Fonts"/*.otf; do + msg "Now patching $f" + # patch font quiet with complete single-width glyphs + python "$srcdir/font-patcher" -q -c -s "$f" -out "$srcdir/patched" &> /dev/null + done +} + +package() { + cd "$srcdir/patched" + install -d "$pkgdir/usr/share/fonts/apple" + install -m644 *.otf "$pkgdir/usr/share/fonts/apple/" +} |