Skip to content

Instantly share code, notes, and snippets.

@sauyon
Last active January 20, 2016 06:21
Show Gist options
  • Save sauyon/ddab7c888859df33a2b5 to your computer and use it in GitHub Desktop.
Save sauyon/ddab7c888859df33a2b5 to your computer and use it in GitHub Desktop.
powerline font PKGBUILD
# Maintainer: Caleb Maclennan <[email protected]>
# Contributor: Sauyon Lee <[email protected]>
pkgname=powerline-fonts
_tag=2015-12-04
pkgver=20151204
pkgrel=1
depends=('fontconfig' 'xorg-font-utils')
url=('https://github.com/powerline/fonts')
license='CPL'
pkgdesc="Patched fonts for Powerline users"
arch=('any')
source=("https://github.com/powerline/fonts/archive/${_tag}.zip")
md5sums=('513f403a20323c0ed4c8c33ac4346b5c')
package() {
install -d "$pkgdir/usr/share/fonts/TTF"
install -d "$pkgdir/usr/share/fonts/OTF"
install -d "$pkgdir/usr/share/fonts/misc"
install -d "$pkgdir/usr/share/kbd/consolefonts"
#install -d "$pkgdir/etc/fonts/conf.avail"
cd "$srcdir/fonts-$_tag"
find . -iname "*.ttf" -exec install -m644 {} $pkgdir/usr/share/fonts/TTF \;
find . -iname "*.otf" -exec install -m644 {} $pkgdir/usr/share/fonts/OTF \;
find . -iname "*.pcf.gz" -exec install -m644 {} $pkgdir/usr/share/fonts/misc \;
find . -iname "*.psf.gz" -exec install -m644 {} $pkgdir/usr/share/kbd/consolefonts \;
}
post_install() {
echo -n "Updating font cache... "
fc-cache -fs >/dev/null
mkfontscale /usr/share/fonts/TTF /usr/share/fonts/Type1
mkfontdir /usr/share/fonts/TTF /usr/share/fonts/Type1
echo "done"
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment