You are not logged in.

#1 2013-08-12 12:46:55

Markus00000
Member
Registered: 2011-03-27
Posts: 282

First PKGBUILD: Fira Sans fonts

Fira Sans is a typeface created for Firefox OS.

Can someone please check this package before I upload it? It installed on my machine without errors and the fonts were available afterwards.

PKGBUILD

# Maintainer: Me <me at example dot com>
pkgname=otf-fira-sans
pkgver=20130812
pkgrel=1
depends=('fontconfig' 'xorg-font-utils')
pkgdesc="A sans-serif typeface (initially called Feura Sans) designed for the Firefox OS."
arch=('any')
url="https://github.com/buildingfirefoxos/Building-Blocks/tree/gh-pages/fonts/FiraSans"
license=('Apache')
_src="https://github.com/buildingfirefoxos/Building-Blocks/raw/gh-pages/fonts/FiraSans"
source=("$_src/FiraSans-Bold.otf"
        "$_src/FiraSans-Light.otf"
        "$_src/FiraSans-Medium.otf"
        "$_src/FiraSans-Regular.otf")
install=${pkgname}.install
sha512sums=('73e...'
            '492...'
            '246...'
            '3ee...')

package() {
  cd ${srcdir}
  install -d ${pkgdir}/usr/share/fonts/OTF
  install -m644 ${srcdir}/*.otf ${pkgdir}/usr/share/fonts/OTF/
}
  • How can I find out whether xorg-fonts-encodings is a dependency like for some other fonts?

  • Should the variable _src be removed or is it better than writing the same base URL four times? This way it would be easier for others to verify the URL.

otf-fira-sans.install

post_install() {
  echo -n "Updating font cache... "
  fc-cache -fs > /dev/null
  mkfontscale /usr/share/fonts/OTF
  mkfontdir /usr/share/fonts/OTF
  echo "done."
}

post_upgrade() {
  post_install $1
}

post_remove() {
  post_install $1
}
  • It seems to first update the font cache and then display "Updating font cache... done." all at once. It should, of course, first print "Updating font cache... ", then update the font cache and only then print "done."

Last edited by Markus00000 (2013-08-12 13:22:55)

Offline

#2 2013-08-12 13:00:22

brebs
Member
Registered: 2007-04-03
Posts: 3,441

Re: First PKGBUILD: Fira Sans fonts

You should be consistent - "OTF" or "TTF" dir? E.g. with the mkfontscale command - wrong dir.

Offline

#3 2013-08-12 13:12:44

Markus00000
Member
Registered: 2011-03-27
Posts: 282

Re: First PKGBUILD: Fira Sans fonts

Well spotted, thank you. I obviously copied it and didn't notice the TTF.

Offline

Board footer

Powered by FluxBB