Skip to content

Created an AUR package, looking for feedback

Hey all, for some reason I recently needed the Unicode Last Resort font. I could not find it in the AUR, so I created my own package and submitted it.

Here it is: https://aur.archlinux.org/packages/ttf-lastresort/

Since this is the first time I've created my own package rather than working on someone else's, there are probably some things I could've done better. Can you help me by pointing those out?

21 points12 comments
Open on Reddit
About this post
Posted
Archived
Score
21 · 100% up
Kind
Text
ID
697eit

Author

11
posts
80
comments
1
media
View profile

13 comments

You don't need unzip as makedepends, because bsdtar (part of the group base-devel) is doing this for you.

Also, you can install the font file with a simple

install -Dm644 LastResort.ttf "$pkgdir/usr/share/fonts/TTF/LastResort.ttf"

as you did with the licence file. The -D parameter will create every parent directory if necessary.

16 points

The -D parameter will create every parent directory if necessary.

Huh. TIL. Guess it's time to pull out all the 'mkdir's in my PKGBUILDs.

7 points

just wanted to say: thank you mang! always like to see people who want to contribute to the community :)

14 points

at first glance. looks fine. A lot of font packages usually have a post-install script to update the font cache (see here for example)

5 points

Thanks for looking into it! I originally had something like this, but then I noticed there were pacman hooks (owned by fontconfig) that did this already, so I decided against it. Since it takes quite some time, it seemed silly to do it twice. Not sure what's the better option here.

4 points

Also, apart from calling fc-cache, if X is installed, there are hooks that will also execute mkfontscale and mkfontdir with all needed parameters, which many people are forgetting in their .install scripts.

3 points

Ah, right. I did forget there are hooks now

2 points
unknown author1 hidden

Deleted before we saved it.

2 points

It is used as a "last resort" font for missing glyphs. Instead of the usual blank square you get a simple description of what it should be, even when no proper depiction is available.

Very useful when debugging missing fonts.

3 points

I don't know that people would necessarily agree but I personally prefer when font packages have the "-font" suffix.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.