summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh VanderLinden2016-11-16 22:57:59 -0700
committerJosh VanderLinden2016-11-16 22:57:59 -0700
commit0443f558cfcd2e1ad923785ca11bf625446b52b7 (patch)
treea1217f1b4dc611a0e10aa4744b9c66a2e9016446
downloadaur-0443f558cfcd2e1ad923785ca11bf625446b52b7.tar.gz
Initial commit: https://blog.golang.org/go-fonts
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD39
-rw-r--r--ttf-go.install13
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5cd51d96b3f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ttf-go-mono-git
+ pkgdesc = The Go font family
+ pkgver = r192.b7f8df6
+ pkgrel = 1
+ url = https://go.googlesource.com/image
+ install = ttf-go.install
+ arch = any
+ license = BSD
+ makedepends = git
+ depends = fontconfig
+ source = repo::git+https://go.googlesource.com/image
+ md5sums = SKIP
+
+pkgname = ttf-go-mono-git
+
+pkgname = ttf-go-sans-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d058b6be889
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Josh VanderLinden <arch@cloudlery.com>
+pkgname=('ttf-go-mono-git' 'ttf-go-sans-git')
+pkgver=r192.b7f8df6
+pkgrel=1
+pkgdesc="The Go font family"
+arch=('any')
+url="https://go.googlesource.com/image"
+license=('BSD')
+depends=('fontconfig')
+makedepends=('git')
+install=ttf-go.install
+source=(repo::git+${url})
+md5sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/repo"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+core_package() {
+ install -Dm644 "${srcdir}/repo/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -d "${pkgdir}/usr/share/fonts/TTF"
+}
+
+package_ttf-go-mono-git() {
+ core_package
+
+ for fn in $(ls "${srcdir}/repo/font/gofont/ttfs/"*.ttf | grep -i mono); do
+ install -Dm644 "${fn}" "${pkgdir}/usr/share/fonts/TTF/$(basename "${fn}")"
+ done
+}
+
+package_ttf-go-sans-git() {
+ core_package
+
+ for fn in $(ls "${srcdir}/repo/font/gofont/ttfs/"*.ttf | grep -vi mono); do
+ install -Dm644 "${fn}" "${pkgdir}/usr/share/fonts/TTF/$(basename "${fn}")"
+ done
+}
diff --git a/ttf-go.install b/ttf-go.install
new file mode 100644
index 00000000000..90b42e9fd07
--- /dev/null
+++ b/ttf-go.install
@@ -0,0 +1,13 @@
+post_install() {
+ fc-cache -s > /dev/null
+ mkfontscale usr/share/fonts/TTF
+ mkfontdir usr/share/fonts/TTF
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}