[arch-commits] Commit in (6 files)

Felix Yan fyan at archlinux.org
Wed Dec 10 14:44:04 UTC 2014


    Date: Wednesday, December 10, 2014 @ 15:44:04
  Author: fyan
Revision: 123719

addpkg: fira 1:3.111-2

Added:
  fira/
  fira/repos/
  fira/trunk/
  fira/trunk/PKGBUILD
  fira/trunk/otf.install
  fira/trunk/ttf.install

-------------+
 PKGBUILD    |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 otf.install |   15 ++++++++++++++
 ttf.install |   15 ++++++++++++++
 3 files changed, 92 insertions(+)

Added: fira/trunk/PKGBUILD
===================================================================
--- fira/trunk/PKGBUILD	                        (rev 0)
+++ fira/trunk/PKGBUILD	2014-12-10 14:44:04 UTC (rev 123719)
@@ -0,0 +1,62 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+
+pkgbase=fira
+pkgname=(ttf-fira-sans ttf-fira-mono otf-fira-sans otf-fira-mono)
+pkgver=3.111
+_commit=d6c39732a0f69080b748b967e87928cac53d342e
+pkgrel=2
+epoch=1
+pkgdesc="Mozilla's typeface designed for Firefox OS"
+arch=('any')
+license=('custom:OFL')
+url='https://github.com/mozilla/Fira'
+makedepends=('git')
+depends=('fontconfig' 'xorg-font-utils')
+source=("git+https://github.com/mozilla/Fira.git#commit=$_commit")
+md5sums=('SKIP')
+
+function _package {
+    cd "$srcdir/Fira"
+
+    case "$1" in
+        ttf-fira-sans)
+            pkgdesc="Mozilla's sans-serif typeface designed for Firefox OS"
+            install=ttf.install
+            cd ttf
+            fonts=(FiraSans-*.ttf)
+            installdir=TTF;;
+        ttf-fira-mono)
+            pkgdesc="Mozilla's monospace typeface designed for Firefox OS"
+            install=ttf.install
+            cd ttf
+            fonts=(FiraMono-*.ttf)
+            installdir=TTF;;
+        otf-fira-sans)
+            pkgdesc="Mozilla's sans-serif typeface designed for Firefox OS"
+            install=otf.install
+            cd otf
+            fonts=(FiraSans-*.otf)
+            installdir=OTF;;
+        otf-fira-mono)
+            pkgdesc="Mozilla's monospace typeface designed for Firefox OS"
+            install=otf.install
+            cd otf
+            fonts=(FiraMono-*.otf)
+            installdir=OTF;;
+    esac
+
+    # Prepare destination directory
+    install -dm755 "$pkgdir/usr/share/fonts/$installdir"
+
+    # Install fonts
+    for font in "${fonts[@]}"; do
+        install -m644 "$font" "$pkgdir/usr/share/fonts/$installdir"
+    done
+
+    install -D -m644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"   
+}
+
+for _pkgname in ${pkgname[@]}; do
+    eval "function package_$_pkgname() { _package $_pkgname; }"
+done


Property changes on: fira/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: fira/trunk/otf.install
===================================================================
--- fira/trunk/otf.install	                        (rev 0)
+++ fira/trunk/otf.install	2014-12-10 14:44:04 UTC (rev 123719)
@@ -0,0 +1,15 @@
+post_install() {
+    echo -n "Updating font cache... "
+    fc-cache -s > /dev/null
+    mkfontscale /usr/share/fonts/OTF
+    mkfontdir /usr/share/fonts/OTF
+    echo "done."
+}
+
+post_upgrade() {
+    post_install $1
+}
+
+post_remove() {
+    post_install $1
+}

Added: fira/trunk/ttf.install
===================================================================
--- fira/trunk/ttf.install	                        (rev 0)
+++ fira/trunk/ttf.install	2014-12-10 14:44:04 UTC (rev 123719)
@@ -0,0 +1,15 @@
+post_install() {
+    echo -n "Updating font cache... "
+    fc-cache -s > /dev/null
+    mkfontscale /usr/share/fonts/TTF
+    mkfontdir /usr/share/fonts/TTF
+    echo "done."
+}
+
+post_upgrade() {
+    post_install $1
+}
+
+post_remove() {
+    post_install $1
+}



More information about the arch-commits mailing list