You are not logged in.
I am working on my second PKGBUILD -- this time for a simple raster font I use. The PKGBUILD uses a post_install() which does an "xset -fp rehash" after installing the font files, because it seemed like otherwise the font wouldn't show up in X. Then in tests I found that the install died with errors when I installed my package without X running. How is this situation normally handled?
Last edited by scottfial (2010-07-09 08:04:21)
Time flies like a banana.
Offline
xset will fail if X isn't running. Font packages generally have an install file like this:
# arg 1: the new package version
post_install() {
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/local
mkfontdir /usr/share/fonts/local
echo "done."
}
# # arg 1: the new package version
# # arg 2: the old package version
post_upgrade() {
post_install $1
}
#
# # arg 1: the old package version
post_remove() {
post_install $1
}
The user can then either run xset manually or logout/login after installation.
Offline
Thanks for your suggestion. I updated my .install file to reflect what you posted. Before that, I was installing the .pcf files to /usr/share/fonts/misc, but I noticed that your example assumes /usr/share/fonts/local. Is that the proper place to install a bitmap font like this?
Time flies like a banana.
Offline
I just picked a random example from the repositories (http://repos.archlinux.org/wsvn/communi … nt.install) and deleted the comment before posting ;-)
Offline
I see. Well, on my system it looks like Dina and Terminus both put their .pcf files in /usr/share/fonts/local. If the big-boys are doing it, I guess it must be the thing to do. Thanks for your help.
Time flies like a banana.
Offline