1 %global fontname <FONTNAME>
2 %global fontconf <①>-%{fontname}
4 #global archivename %{name}-%{version} ②
7 <FONT COLLECTION DESCRIPTION: ③>
10 Name: %{fontname}-fonts
15 Group: User Interface/X
19 Source1: %{name}-fontconfig.conf
22 BuildRequires: fontpackages-devel
29 Summary: Common files of <NAME>
30 Requires: fontpackages-filesystem
35 This package consists of files used by other %{name} packages.
37 # Repeat for every font family ➅
38 %package -n %{fontname}-<FAMILY>-fonts
40 Requires: %{name}-common = %{version}-%{release}
42 %description -n %{fontname}-<FAMILY>-fonts
47 %_font_pkg -n <FAMILY> -f %{fontconf}-<FAMILY>.conf <NAME>*.ttf
60 install -m 0755 -d %{buildroot}%{_fontdir}
61 install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
63 install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
64 %{buildroot}%{_fontconfig_confdir}
66 # Repeat for every font family
67 install -m 0644 -p %{SOURCEX} \
68 %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-<FAMILYX>.conf
70 for fconf in %{fontconf}-<FAMILYX>.conf \
71 %{fontconf}-<FAMILYY>.conf \
72 %{fontconf}-<FAMILYZ>.conf ; do
73 ln -s %{_fontconfig_templatedir}/$fconf \
74 %{buildroot}%{_fontconfig_confdir}/$fconf
83 %defattr(0644,root,root,0755)
91 # (remove it from your final spec file, with the other comments)
94 # This template can be used with complex multi-font releases
95 # (several font families ⑤ in one upstream archive):
96 # — if you intend to package a single font family, use
97 # spectemplate-fonts-simple.spec
98 # – if upstream releases separate fonts in separate archives, do not try to
99 # stuff them in a single srpm, just package them separately.
101 # <FOO> placeholders must be replaced by something appropriate for your font.
105 # Two-digit fontconfig priority number, see:
106 # /usr/share/fontconfig/templates/fontconfig-priorities.txt
112 # This will be reused in every sub-package description.
113 # Please do not forget to complete it with subpackage-specific information.
116 # Do not trust font metadata versionning unless you've checked upstream does
117 # update versions on file changes. When in doubt use the timestamp of the most
118 # recent file as version. “1.0” versions especially are suspicious.
121 # — A font family corresponds to one entry in GUI font lists. For example,
122 # DejaVu Sans, DejaVu Serif and DejaVu Sans Mono are three different font
124 # — A font family is subdivided in faces or styles. DejaVu Sans Normal, DejaVu
125 # Sans Bold, DejaVu Sans Condensed Italic are three faces of the DejaVu Sans
127 # — A font-metadata aware tool such as gnome-font-viewer or fontforge can be
128 # used to check the font family name and the font face/style declared by a
130 # — For use in spec files, convert names to lowerscript and replace spaces