Created
May 23, 2018 13:47
-
-
Save axionl/ae87593cfbc6516f3dfffeeb8bf1c0a6 to your computer and use it in GitHub Desktop.
[otf-fira-code] pkgbuild file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id$ | |
# Maintainer: Ariel AxionL <axionl@aosc.io> | |
pkgbase=fira-code-fonts | |
pkgname=('ttf-fira-code' 'otf-fira-code') | |
pkgver=1.205 | |
pkgrel=1 | |
pkgdesc="Monospaced font with programming ligatures" | |
arch=('any') | |
license=('custom:OFL') | |
url='https://github.com/tonsky/FiraCode' | |
depends=('fontconfig' 'xorg-font-utils') | |
conflicts=('fira-code-fonts-git') | |
source=("$pkgbase-$pkgver.tar.gz::https://github.com/tonsky/FiraCode/archive/${pkgver}.tar.gz") | |
sha512sums=('cbeb5fe4577ff6de5c4d58247c3b82b7aec4022afa5552394c660846d8caab8cca3a1a44aed8cccd10d03fe8c38e419d97663f5a750bd9d4e11ec4d2e5659bf8') | |
function _package { | |
dir=$srcdir/FiraCode-$pkgver | |
cd $dir/distr | |
case "$1" in | |
ttf-fira-code) | |
cd ttf | |
fonts=(FiraCode*.ttf) | |
installdir=TTF;; | |
otf-fira-code) | |
cd otf | |
fonts=(FiraCode*.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 LICENSE | |
install -Dm644 $dir/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
} | |
for _pkgname in ${pkgname[@]}; do | |
eval "function package_$_pkgname() { _package $_pkgname; }" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I took the liberty of simplifying the
_package
function even further, and also reordering and quoting stuff. You can find it in my fork.