topological-modular-forms / Darwin-Typeface

This is the project repository for Darwin, a typeface for books and articles, with a focus on scientific writing.
SIL Open Font License 1.1
215 stars 4 forks source link

add PKGBUILD file #47

Closed raphael-proust closed 4 months ago

raphael-proust commented 4 months ago

Add a PKGBUILD file. On an Archlinux system it allows the following commands to install the font as a normal package (meaning it can be updated, removed, etc. using the package manager).

makepkg
pacman -U <name-of-the-package-file>.pkg.tar.zst
  1. It would be nice if someone else with a similar system tried to run the commands to check that it works not just on my machine.
  2. The file names for the installed files are hard-coded. It'd be better to loop over them in some way but I'm not sure what's the most portable way to do so.
topological-modular-forms commented 4 months ago

Thank you so much, Raphael!

Is the following chain of commands correct for installing the fonts on an Archlinux system?

git clone https://github.com/topological-modular-forms/Darwin-Typeface/
cd Darwin-Typeface
makepkg
pacman -U darwin.pkg.tar.zst

I want to add something like this to the README so that users could simply copy and paste it into the terminal to install the fonts, but I'm not familiar with Arch so I think there's a good chance I've made a mistake.

Again, thank you so much!

raphael-proust commented 4 months ago

The sequence of command is mostly there. The only issue is that the package name has some additional details: the date and the architecture it's built on. E.g., today on my machine darwin-20240512-1-x86_64.pkg.tar.zst

I think the following command should work:

pacman -U darwin-$(date +%Y%m%d)-1-$(uname -m).pkg.tar.zst

The other possible issue is that this command typically fails and tells you that only root can install packages. But I think it's ok to leave as is and let the user figure out they need to sudo.

topological-modular-forms commented 4 months ago

Thank you so much, Raphael!

The other possible issue is that this command typically fails and tells you that only root can install packages. But I think it's ok to leave as is and let the user figure out they need to sudo.

Do you think adding it as

sudo pacman -U darwin-$(date +%Y%m%d)-1-$(uname -m).pkg.tar.zst

in the README could be troublesome?

raphael-proust commented 4 months ago

I think it's reasonable to add this instruction in the README yes. The sudo is only going to be useful for some users but the users for which it is not useful should know enough to work around it.

topological-modular-forms commented 4 months ago

Ah, perfect, then! I've updated the section on installing the fonts with these instructions here.

Thank you so much again, Raphael!