summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-07-27 13:13:49 +0300
committerCaleb Maclennan2020-07-27 13:13:49 +0300
commit5a722b43e1164d2afa48ff4008d315794fa3cf97 (patch)
tree5b81d00db56f8cb3988239d7505a6b3fa27ccea0
parent2abbae20f8909007d667fe733c59a0f439ee4b4d (diff)
downloadaur-5a722b43e1164d2afa48ff4008d315794fa3cf97.tar.gz
Adopt, overhaul to actually build fonts from git HEAD
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD58
2 files changed, 49 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e44f659f6ea9..80bf77b580ab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,24 @@
pkgbase = otf-fira-code-git
- pkgdesc = Fira Code: monospaced font with programming ligatures.
- pkgver = 1.205.r6.gade27f5
+ pkgdesc = Monospaced font with programming ligatures
+ pkgver = 5.2.r4.g1a60382
pkgrel = 1
- url = https://github.com/tonsky/FiraCode.git
- install = otf.install
+ url = https://github.com/tonsky/FiraCode
arch = any
- license = custom:OFL
+ license = OFL
+ makedepends = ttfautohint
+ makedepends = woff2
+ makedepends = gftools
makedepends = git
- depends = fontconfig
- depends = xorg-font-utils
+ makedepends = sfnt2woff-zopfli
+ makedepends = python-fontmake
+ makedepends = python-idna
+ makedepends = python-pillow
+ makedepends = python-requests
+ makedepends = python-urllib3
+ provides = otf-fira-code
+ conflicts = otf-fira-code
source = git+https://github.com/tonsky/FiraCode.git
- source = otf.install
- md5sums = SKIP
- md5sums = 9b9dbd9712ac6fefe896f704609b659c
+ sha256sums = SKIP
pkgname = otf-fira-code-git
diff --git a/PKGBUILD b/PKGBUILD
index 070541053709..94b57633890d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,43 @@
-# Maintainer: James Zhu <james.zhu.engineer@gmail.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+# Contributor: James Zhu <james.zhu.engineer@gmail.com>
+_gitname=FiraCode
pkgname=otf-fira-code-git
-pkgver=1.205.r6.gade27f5
+pkgver=5.2.r4.g1a60382
pkgrel=1
-pkgdesc="Fira Code: monospaced font with programming ligatures."
+pkgdesc="Monospaced font with programming ligatures"
arch=('any')
-url='https://github.com/tonsky/FiraCode.git'
-license=('custom:OFL')
-depends=('fontconfig' 'xorg-font-utils')
-makedepends=('git')
-install=otf.install
-source=('git+https://github.com/tonsky/FiraCode.git' 'otf.install')
-md5sums=('SKIP'
- '9b9dbd9712ac6fefe896f704609b659c')
-
-_gitname=FiraCode
+url="https://github.com/tonsky/$_gitname"
+license=('OFL')
+_py_deps=('fontmake'
+ 'idna'
+ 'pillow'
+ 'requests'
+ 'urllib3')
+makedepends=('ttfautohint'
+ 'woff2'
+ 'gftools'
+ 'git'
+ 'sfnt2woff-zopfli')
+makedepends+=("${_py_deps[@]/#/python-}")
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("git+$url.git")
+sha256sums=('SKIP')
pkgver() {
- cd "$srcdir/$_gitname"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "$_gitname"
+ git describe --long --tags --abbrev=7 HEAD |
+ sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
-package() {
- cd "$srcdir/$_gitname"
-
- local weights=('Regular' 'Bold' 'Light' 'Medium' 'Retina')
- local font='FiraCode'
+build() {
+ cd "$_gitname"
+ ./scripts/build
+}
- for weight in ${weights[*]}; do
- local name="${font}-${weight}.otf"
- install -Dm644 "distr/otf/$name" "$pkgdir/usr/share/fonts/OTF/$name"
- done
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+package() {
+ cd "$_gitname"
+ install -Dm644 -t "$pkgdir/usr/share/fonts/OTF/" distr/otf/$_gitname-*.otf
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}