Create an AUR font package

Good morning y’all

I create an AUR package to make a font available for everybody and me. So I created an AUR account and copied a PKGBUILD template from my system to edit it and provide the necessary information.

When listing the /usr/share/fonts/ I saw, that all fonts were installed with single quotation marks. Why?

Before I try out my first package, I’d like to let you review my script, before installing it into my ‘craptop’. Any ideas and improvements are welcome, e.g. the variable stuff. Do I need them here? Are there any to use, instead the hard-coded stuff the like: /usr/share/fonts and so on, because the template used some.

The AUR script:

# Maintainer: semo <semox78@gmail.com>
pkgname=europlate.ttf
pkgver=1.0
pkgrel=1
pkgdesc="EuroPlate - TrueType Font for european number plates."
arch=('any')
url="http://www.autokennzeichen.info/kennzeichen-schriftart.htm"
license=('MIT')
source=("http://www.autokennzeichen.info/files/EuroPlate.ttf")
md5sums=('97a834894e9186114b53cb801f73c18b')

package() {
    cd "/usr/share/fonts/"
    make DESTDIR="EuroPlate/ttf/" install
}

Is all in place where it should be? Can I accidentially break my system due, to install?

1 Like

Try this instead:

package() {
   cd "$srcdir"
   install -dm755 "${pkgdir}/usr/share/fonts/EuroPlate"
   install -Dm644 EuroPlate.ttf -t "${pkgdir}/usr/share/fonts/EuroPlate"
}

(Untested)

1 Like

Thank you @Head_on_a_Stick. That worked perfectly. I will decode the commands for me now. I tried it in LbreOffice Writer and the font was available and ready to use. Cool. :+1:

EDIT: I also unlocked the achievement to create an AUR package. It’s available by name “europlate”.

2 Likes