-
Notifications
You must be signed in to change notification settings - Fork 0
/
msttcore-fonts-installer-2.6-1.spec
266 lines (217 loc) · 10.5 KB
/
msttcore-fonts-installer-2.6-1.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
%define fontname msttcore
# directory to unpack truetype fonts from the cab into
%define fontdir %{_datadir}/fonts/%{fontname}
%define download_script /usr/lib/msttcore-fonts-installer/refresh-msttcore-fonts.sh
%define cabfiles_sha256sums /usr/lib/msttcore-fonts-installer/cabfiles.sha256sums
%define license_file /usr/share/doc/msttcore-fonts-installer/READ_ME!
Summary: Installer for Microsoft core TrueType fonts for better Windows Compatibility
Name: %{fontname}-fonts-installer
Obsoletes: msttcorefonts <= 2.5-1
Provides: msttcorefonts = 2.6-1
Version: 2.6
Release: 1
License: GPLv2
Group: User Interface/X
BuildArch: noarch
Requires: curl
Requires: cabextract
Requires: xorg-x11-font-utils
Requires: fontconfig
Packager: Rob Janes <janes.rob gmail com>
Source: msttcore-fonts-installer-2.6.tar.gz
URL: http://mscorefonts2.sourceforge.net/
%description
This installs the TrueType core fonts for the web that were once
available from http://www.microsoft.com/typography/fontpack/ prior
to 2002, and most recently updated in the European Union Expansion
Update circa May 2007, still available on the Microsoft website.
This also installs Microsoft's ClearType fonts, see
http://www.microsoft.com/typography/ClearTypeFonts.mspx for more info.
Note that the TrueType fonts are not part of the rpm. They are
downloaded by the rpm when the rpm is installed.
The font cab files are downloaded from a Sourceforge project mirror
and unpacked at install time. Therefore this package technically
does not 'redistribute' the cab files. The fonts are then added to
the core X fonts system as well as the Xft font system.
These are the cab files downloaded:
andale32.exe, arialb32.exe, comic32.exe, courie32.exe,
georgi32.exe, impact32.exe, webdin32.exe, EUupdate.EXE,
wd97vwr32.exe, PowerPointViewer.exe
The following cab files are only downloaded if EUupdate.EXE cannot
be downloaded, since the EUupdate.EXE cab contains updates for
the fonts in these cabs:
arial32.exe, times32.exe, trebuc32.exe, verdan32.exe
These are the fonts added:
1998 Andale Mono
2006 Arial: bold, bold italic, italic, regular
1998 Arial: black
2007 Calabri: bold, bold italic, italic, regular
2007 Cambria: bold, bold italic, italic
2007 Candara: bold, bold italic, italic, regular
2007 Consolas: bold, bold italic, italic, regular
2007 Constantia: bold, bold italic, italic, regular
2007 Corbel: bold, bold italic, italic, regular
1998 Comic: bold, regular
2000 Courier: bold, bold italic, italic, regular
1998 Impact
2006 Times: bold, bold italic, italic, regular
2006 Trebuchet: bold, bold italic, italic, regular
2006 Verdana: bold, bold italic, italic, regular
1998 Webdings
%prep
%setup
%install
find . | cpio -pdm $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{fontdir}
echo not-empty > $RPM_BUILD_ROOT/%{fontdir}/fonts.dir
echo not-empty > $RPM_BUILD_ROOT/%{fontdir}/fonts.scale
mkdir -p $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/
cat -> $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/09-msttcore-fontpath.conf <<'EOT'
Section "Files"
FontPath "%{fontdir}"
EndSection
EOT
%clean
[ "${RPM_BUILD_ROOT:-nonexistantdir}" != "/" ] && rm -rf ${RPM_BUILD_ROOT:-nonexistantdir}
%post
%{download_script} -F %{fontdir} -L %{license_file}
%postun
if [ "$1" = "0" ]; then
counter=0
for ff in %{fontdir}/*.ttf; do
if [ -f "$ff" ]; then
if [ $counter -eq 0 ]; then
echo "### Removing ttf files in %{fontdir}" >&2
fi
# these files are installed "manually" so they must be removed "manually".
# ie, rpm won't do it for us, it doesn't know about them.
rm -f "$ff"
counter=`expr $counter + 1`
fi
done
if [ $counter -gt 0 ]; then
echo "### ttf files already removed" >&2
fi
if [ -x %{_bindir}/fc-cache ]; then
echo "### Rebuilding Xft font cache" >&2
%{_bindir}/fc-cache -f -v || :
fi
[ -f /etc/fonts/conf.d/09-msttcore-fonts.conf ] && rm -f /etc/fonts/conf.d/09-msttcore-fonts.conf
[ -f "%{license_file}" ] && rm -f "%{license_file}"
[ -f /usr/lib/msttcore-fonts-installer/installed-list.txt ] && rm -f /usr/lib/msttcore-fonts-installer/installed-list.txt
echo "### Removing %{fontdir} from the core X fonts path" >&2
xset -fp %{fontdir} || :
xset fp rehash || :
fi
%files
%defattr(-,root,root,-)
%attr(-,root,root) %{fontdir}
%config(noreplace) /etc/X11/xorg.conf.d/09-msttcore-fontpath.conf
%docdir /usr/share/doc/msttcore-fonts-installer
%attr(-,root,root) /usr/share/doc/msttcore-fonts-installer
/usr/lib/msttcore-fonts-installer
%changelog
* Wed May 29 2013 Rob Janes <janes.rob gmail com> 2.6-1
- added ClearType fonts, thanks to Robbie Litchfield.
see http://www.microsoft.com/typography/ClearTypeFonts.mspx for more info.
- added %verify section to qualify rpm -V, thanks to discussion on rpmfusion
- bumped version number past Daniel Resare's. Tried to coordinate with him, but he's
working on mac stuff now and not interested - "I've given up on Linux on the desktop."
- available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-installer-2.6-1.spec
* Sun Oct 7 2012 Rob Janes <janes.rob gmail com> 2.2-1
- moved install script to shell script, run in post step
- switched to sha256 from md5
- available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-installer-2.2-1.spec
* Mon Sep 15 2012 Rob Janes <janes.rob gmail com> 2.1-2
- updated comments, messages, description and such.
- don't download older cabs for fonts in the EUupdate.EXE file,
unless the download for the EUupdate failed.
- available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-2.1-2.spec
* Sun Sep 9 2012 Daniel Resare <noa resare com> 2.5-1
- Daniel Resare: "Ouch, that was a few years. Due to the kind contributions of
Deven T. Corzine we now have an updated (and working!) package again."
- Almost the same feature set as Dennis Johnson's 2.0-6
- updates the hardcoded sourceforge mirror list - does not use sourceforge's mirror redirect
(meaning it will get out of date again).
- replaces deprecated BuildPrereq with BuildRequires
- available at http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
* Sat Sep 8 2012 Rob Janes <janes.rob gmail com> 2.1-1
- generates distributable rpm that downloads and unpacks the fonts at
install time, not rpmbuild time
- available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-2.1-1.spec
* Sat Sep 8 2012 Rob Janes <janes.rob gmail com> 2.0-7
- added EUupdate.EXE European Union Expansion Update circa May 2007
- refactored sourceforge mirror stuff
- replaced wget with curl, which seems to be installed by default on fedora
- replaced ttmkfdir with mkfontscale and mkfontdir. This creates fonts.dir file
for the core X font system. ttmkfdir has been supersceded by mkfontdir - they
both create fonts.dir but mkfontdir is part of xorg-x11-font-utils.
- removed 09-msttcorefonts.conf and refactored fc-cache lines. fc-cache walks
subdirectories so the 09-msttcorefonts.conf to add the /usr/share/font/msttcore
is redundant. fc-cache indexes for the Xft font system, not the legacy core X
font system.
- added 09-msttcore-fontpath.conf to /etc/X11/xorg.conf.d for core X font system
- added xset fp+ to add the fontdirectory to core X font for the current session so
the installer doesn't have to relogin.
- available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-2.0-7.spec
* Mon Aug 15 2011 Dennis Johnson 2.0-6
- BuildRequires ttmkfdir, cabextract, wget
- removes Requires
- fixes sourceforge mirror
- generates 09-msttcorefonts.conf
- restores call to ttmkfdir in install section
- available from http://fenris02.fedorapeople.org/msttcore-fonts-2.0-6.spec
* Sat Dec 11 2010 Hnr Kordewiner <[email protected]> 2.0-5
- move 09-msttcorefonts.conf to this spec file
- drop %{ttmkfdir} - again
- msttcore fonts history site setup at http://moin.kordewiner.com/helpdesk/fedora/mscorefonts
- available from http://moin.kordewiner.com/helpdesk/fedora/mscorefonts?action=AttachFile&do=get&target=msttcore-fonts-2.0-5.spec
* Mon Jun 07 2010 Zied FAKHFAKH <[email protected]> 2.0-3
- removed chkfontpath dependency for Fedora >= 9
- removed prerun and post chkconfig reference
- divergent development, same purpose as Andrew Bartlett's but derived from Noa Resare's 2.0-1
- available from http://moin.kordewiner.com/helpdesk/fedora/mscorefonts?action=AttachFile&do=get&target=msttcorefonts-2.0-3.spec
* Tue Jun 16 2009 Dennis Johnson
- Provides msttcorefonts
- Requires ttmkfdir, cabextract
- restores call to ttmkfdir in install section
- available from http://fenris02.fedorapeople.org/msttcore-fonts-2.0-4.spec
* Wed Jun 25 2008 Muayyad Saleh Alsadi <alsadi gmail com> 2.0-3
- drop %{ttmkfdir} completely
* Mon Feb 18 2008 Andrew Bartlett <abartlet samba org> 2.0-2
- Make work with Fedora 9 fonts system
- available from http://moin.kordewiner.com/helpdesk/fedora/mscorefonts?action=AttachFile&do=get&target=msttcorefonts-2.0-2.spec
* Sun May 07 2006 Noa Resare <noa resare com> 2.0-1
- checksums downloads
- random mirror
- use redistributable word 97 viewer as source for tahoma.ttf
- available from http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
* Mon Mar 31 2003 Daniel Resare <noa resare com> 1.3-4
- updated microsoft link
- updated sourceforge mirrors
* Mon Nov 25 2002 Daniel Resare <noa resare com> 1.3-3
- the install dir is now deleted when the package is uninstalled
- executable permission removed from the fonts
- executes fc-cache after install if it is available
* Thu Nov 07 2002 Daniel Resare <noa resare com> 1.3-2
- Microsoft released a new service-pack. New url for Tahoma font.
* Thu Oct 24 2002 Daniel Resare <noa resare com> 1.3-1
- removed python hack
- removed python hack info from description
- made tahoma inclusion depend on define
- added some info on the ttmkfdir define
* Tue Aug 27 2002 Daniel Resare <noa resare com> 1.2-3
- fixed spec error when tahoma is not included
* Tue Aug 27 2002 Daniel Resare <noa resare com> 1.2-2
- removed tahoma due to unclear licensing
- parametrized ttmkfdir path (for mandrake users)
- changed description text to reflect the new microsoft policy
* Thu Aug 15 2002 Daniel Resare <noa resare com> 1.2-1
- changed distserver because microsoft no longer provides them
* Tue Apr 09 2002 Daniel Resare <noa resare com> 1.1-3
- fixed post/preun script to actually do what they were supposed to do
* Tue Mar 12 2002 Daniel Resare <noa resare com> 1.1-2
- removed cabextact from this package
- added tahoma font from ie5.5 update
* Fri Aug 25 2001 Daniel Resare <noa metamatrix se>
- initial version