This template can be used with simple font releases (one font family in one upstream archive):
- if you're unlucky enough upstream released several font families in a single archive, use spectemplate-fonts-multi.spec
- if upstream releases separate fonts in separate achives, do not try to stuff them in a single spec/package, just package them separately.
Please remove the template comments when creating your own file; <FOO> must be replaced by something appropriate for your font.
%define fontname <FONTNAME>
%define fontconf <XX>-%{fontname}.conf
#define archivename %{name}-%{version}
Name: %{fontname}-fonts
Version:
Release: 1%{?dist}
Summary:
Group: User Interface/X
License:
URL: Source0: Source1: %{name}-fontconfig.conf
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch BuildRequires: fontpackages-devel Requires: fontpackages-filesystem
Incidentally, this is a good way to check if the licensing information declared by upstream is correct and if some fontconfig substitution rules can be added to the package.
Examples of terrific font descriptions are found on the Greek Font Society web site. This is what other font packages should strive to emulate.
%description
%prep %setup -q
%build
%install rm -fr %{buildroot} install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ %{buildroot}%{_fontconfig_confdir} install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
- install it in %{_fontconfig_templatedir},
- create symbolic link with the same name in %{_fontconfig_confdir}, that points to /dev/null.
ln -s %{_fontconfig_templatedir}/%{fontconf} \ %{buildroot}%{_fontconfig_confdir}/%{fontconf}
%clean rm -fr %{buildroot} %_font_pkg -f %{fontconf} *.ttf %doc %dir %{_fontdir} %changelog
Notes:
- ↑ Thus Sourceforge is not a foundry
- ↑ The metadata embedded in TTF or OTF files.
- ↑ Print, screen, headings, code…