| NEWS: (updated 2008-09-30) Infrastructure status | New SSH fingerprints | New package signing key |
Packaging/FontsSpecTemplate
From FedoraProject
Jump to: navigation, search
The following annotated template is intended to help you understand the Fedora fonts packaging policy. A plain-text version without formatting or annotations is available in the rpmdevtools package.
| Common directives | Comment |
| Only if you declare fontconfig rules | Comment |
| Some other optional part | Comment |
| %define fontname … | Upstream lowercased project name, without any fonts or font affix. |
| %define fontdir %{_datadir}/fonts/%{fontname} | %{_datadir}/fonts is owned by the filesystem package. |
| %define fontconfdir %{_sysconfdir}/fonts/conf.d | Owned by the filesystem package. |
| %define archivename … | Usually a mix of %{fontname} and %{version}. |
| Name: %{fontname}-fonts | See also our grouping conventions. |
| Version: … |
|
| Release: …%{?dist} | |
| Summary: … fonts | |
| Group: User Interface/X | |
| License: … | Make sure you've read and understand our legal page. |
| URL: … | |
| Source0: …/%{archivename}.… | |
| Source1: %{name}-fontconfig.conf | Fontconfig ruleset for the fonts being packaged. |
| BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | Or any other approved choice. |
| BuildArch: noarch | |
| Conflicts: fontconfig<… |
|
| %description | Is the font style unusual, does it cover remarkable unicode blocks? Is the font intended for screen or print media, plain-text or fancy decoration uses? |
| … | |
| %prep | |
| %setup -q -n %{archivename} | |
| %build | Try to build fonts from source. |
| %install | |
| rm -fr %{buildroot} | |
| install -m 0755 -d %{buildroot}%{fontdir} | |
| install -m 0644 -p …/*.ttf …/*.otf %{buildroot}%{fontdir} | |
| install -m 0755 -d %{buildroot}%{fontconfdir} | For a discussion on the choice of … visit our fontconfig page. |
| install -m 0644 -p %{SOURCE1} %{buildroot}%{fontconfdir}/…-%{fontname}.conf | |
| %clean | |
| rm -fr %{buildroot} | |
| %post |
|
| if [ -x %{_bindir}/fc-cache ] ; then | |
| %{_bindir}/fc-cache -f %{fontdir} || : | |
| fi | |
| %postun | |
| if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then | |
| %{_bindir}/fc-cache -f %{fontdir} || : | |
| fi | |
| %files | |
| %defattr(0644,root,root,0755) | Any other set of permission is almost certain to be a fonts packaging bug. |
| %doc *.txt | |
| %config(noreplace) %{fontconfdir}/XX-%{fontname}.conf | This is sufficient to drop a Fontconfig ruleset that will be evaluated if fontconfig is installed, and will have no effects otherwise[4]. |
| %dir %{fontdir} | |
| %{fontdir}/*.ttf | |
| %{fontdir}/*.otf | |
| %changelog | Changelog in approved format. |
| … |
Fonts in Fedora
The Fonts SIG takes loving care of Fedora fonts. Please join this special interest group if you are interested in creating, improving, packaging, or just suggesting a font. Any help will be appreciated.
The Fonts SIG takes loving care of Fedora fonts. Please join this special interest group if you are interested in creating, improving, packaging, or just suggesting a font. Any help will be appreciated.
Retrieved from "https://fedoraproject.org/wiki/Packaging/FontsSpecTemplate"

