archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / fira-mono / repos / community-any / PKGBUILD
blob5f797b632953f4bc9e55babe71a445daf272c341
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgbase=fira-mono
4 pkgname=(ttf-fira-mono otf-fira-mono)
5 pkgver=3.206
6 _tag=4.106  # Tags are at Fira Sans' version
7 pkgrel=4
8 epoch=2
9 pkgdesc="Mozilla's typeface designed for Firefox OS (Monospace)"
10 arch=('any')
11 license=('custom:OFL')
12 url='https://github.com/mozilla/Fira'
13 source=("$pkgbase-$pkgver.tar.gz::https://github.com/mozilla/Fira/archive/$_tag.tar.gz")
14 sha512sums=('e8ad42351065f6a9308c5a7315f126886d243a6789425507a381a1d31443cd1aa8d981d04956bd2f2d0a193a9f3f7bc7d94cfec4b5dcfb0389d7d963295686d3')
16 function _package {
17     cd Fira-$_tag
19     case "$1" in
20         ttf-fira-mono)
21             pkgdesc="Mozilla's monospace typeface designed for Firefox OS"
22             cd ttf
23             fonts=(FiraMono*.ttf)
24             installdir=TTF;;
25         otf-fira-mono)
26             pkgdesc="Mozilla's monospace typeface designed for Firefox OS"
27             cd otf
28             fonts=(FiraMono*.otf)
29             installdir=OTF;;
30     esac
32     # Prepare destination directory
33     install -dm755 "$pkgdir/usr/share/fonts/$installdir"
35     # Install fonts
36     for font in "${fonts[@]}"; do
37         install -m644 "$font" "$pkgdir/usr/share/fonts/$installdir"
38     done
40     install -D -m644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"   
43 for _pkgname in ${pkgname[@]}; do
44     eval "function package_$_pkgname() { _package $_pkgname; }"
45 done