You are not logged in.
Not from the official repositories, not from the AUR.
How to do it when you already downloaded the zip file, which contains the ttf file and the license file.
For example I'm trying to install the Poiret One font from fonts.google, I know that I can just paste the ttf file in /usr/share/fonts/ but the wiki recommends to install them using pacman, by creating the package first.
But I'don't know how to create a PKGBUILD for a font.
I found out that you can use the files in /usr/share/pacman/ as templates to create PKGBUILDs but can't figure out how to use them for a font you already downloaded in zip format.
if this is a subject for the newbie forum can some moderator move this to the proper topic please?
If someone can show me the way I'll really appreciate it, do I need to create a tar file and then use pacman -U to do the install? or do I need to write the pacman -U command inside the PKGBUILD and then run makepkg -si to get it done?
2023-05-10 08:55 EDIT: Answer in reply #6 and #7, #solution #answer
Last edited by milojarow (2023-05-10 13:57:11)
Offline
Pacman is a package manager and works with pacman package files only.
Packages are being built using makepkg. A PKGBUILD contains information needed for makepkg to build a package.
You may use existing PKGBUILDs as a template. For example those of official packages (ttf-dejavu), or PKGBUILDs people published elsewhere (ttf-au on GitHub, ttf-unifont on AUR).
Last edited by mpan (2023-05-04 00:20:07)
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
Or just put the font in ~/.local/share/fonts/
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Or just put the font in ~/.local/share/fonts/
Yes, of course I can do that BUT I'm trying to do it as the arch wiki says, using pacman to do it, create the package.
Only thing is that the wiki doesn't say anything about how to create a PKGBUILD for a font
Offline
The wiki gives you options - creating a package is only really relevant if you are going to share that package.
But there is a wiki page (linked previously) on makepkg a PKGBUILD (for a font or for anything else).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The wiki gives you options - creating a package is only really relevant if you are going to share that package.
But there is a wiki page (linked previously) on makepkg a PKGBUILD (for a font or for anything else).
You're right, I found this section Arch package guidelines with the guidelines for font packages. Thanks to it I was able to create the packages and do the install.
This is the PKGBUILD:
# Maintainer: name<name at hush dot com>
pkgname=ttf-koulen
pkgver=0.1
pkgrel=1
pkgdesc="Koulen is a Khmer font for headlines, titles and subtitles, and even banner designs."
arch=("any")
url="https://fonts.google.com/download?family=Koulen"
license=("OFL")
source=("Koulen-Regular.ttf"
"OFL.txt")
sha256sums=('SKIP'
'SKIP')
package() {
install -d ${pkgdir}/usr/share/fonts/TTF
install -m644 Koulen-Regular.ttf ${pkgdir}/usr/share/fonts/TTF/
install -D -m644 OFL.txt ${pkgdir}/usr/share/licenses/${pkgname}/OFL
}
once the PKGBUILD done, checked with
namcap
and run
makepkg -si
.
Worked wonders.
Last edited by milojarow (2023-05-16 02:35:05)
Offline
Pacman is a package manager and works with pacman package files only.
Packages are being built using makepkg. A PKGBUILD contains information needed for makepkg to build a package.
You may use existing PKGBUILDs as a template. For example those of official packages (ttf-dejavu), or PKGBUILDs people published elsewhere (ttf-au on GitHub, ttf-unifont on AUR).
I found that makepkg has pacman -U inside of its code.
Thanks for the templates (Y).
Offline