%global fontname mscore # directory to unpack truetype fonts from the cab into %global fontdir %{_datadir}/fonts/%{fontname} %global sf_corefonts http://downloads.sourceforge.net/corefonts/the%20fonts/final Summary: Microsoft core TrueType fonts for better Windows Compatibility Name: %{fontname}-fonts Version: 1.0 Release: 1 URL: http://mscorefonts2.sourceforge.net/ License: non-redistributable, no commercial use, no modifications permitted Group: User Interface/X BuildArch: noarch Source1: http://sourceforge.net/projects/mscorefonts2/files/cabs/EUupdate.EXE Source2: %{sf_corefonts}/andale32.exe Source3: %{sf_corefonts}/arialb32.exe Source4: %{sf_corefonts}/comic32.exe Source5: %{sf_corefonts}/courie32.exe Source6: %{sf_corefonts}/georgi32.exe Source7: %{sf_corefonts}/impact32.exe Source8: %{sf_corefonts}/webdin32.exe Source10: 55-%{fontname}-arial.conf Source11: 55-%{fontname}-andale.conf Source12: 55-%{fontname}-comic.conf Source13: 55-%{fontname}-courier.conf Source14: 55-%{fontname}-georgia.conf Source15: 55-%{fontname}-impact.conf Source16: 55-%{fontname}-times.conf Source17: 55-%{fontname}-trebuchet.conf Source18: 55-%{fontname}-verdana.conf Source19: 55-%{fontname}-webdings.conf Requires: xorg-x11-font-utils Requires: fontconfig Requires: %{fontname}-andale-fonts Requires: %{fontname}-arial-fonts Requires: %{fontname}-comic-fonts Requires: %{fontname}-courier-fonts Requires: %{fontname}-georgia-fonts Requires: %{fontname}-impact-fonts Requires: %{fontname}-times-fonts Requires: %{fontname}-trebuchet-fonts Requires: %{fontname}-verdana-fonts Requires: %{fontname}-webdings-fonts BuildRequires: cabextract BuildRequires: fontpackages-devel Obsoletes: msttcore-fonts-installer <= 2.6 Provides: msttcore-fonts-installer = 2.6 Obsoletes: msttcorefonts <= 2.1 Provides: msttcorefonts = 2.1 %description TrueType core fonts for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack/ , updated in the European Union Expansion Update circa May 2007, still available on the Microsoft website. %package common Summary: Common support files %description common Common support files for %{fontname}-fonts packages including licenses. %package -n %{fontname}-arial-fonts Summary: %{fontname} Arial ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-arial-fonts Microsoft Arial font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack/ , updated in the European Union Expansion Update circa May 2007, still available on the Microsoft website. %_font_pkg -n arial -f *-%{fontname}-arial.conf Arial*.ttf AriBlk.TTF %package -n %{fontname}-times-fonts Summary: %{fontname} Times ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-times-fonts Microsoft Times font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack/, updated in the European Union Expansion Update circa May 2007, still available on the Microsoft website. %_font_pkg -n times -f *-%{fontname}-times.conf Times*.ttf %package -n %{fontname}-trebuchet-fonts Summary: %{fontname} Trebuchet ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-trebuchet-fonts Microsoft Trebuchet font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack, updated in the European Union Expansion Update circa May 2007, still available on the Microsoft website. %_font_pkg -n trebuchet -f *-%{fontname}-trebuchet.conf trebuc*.ttf %package -n %{fontname}-verdana-fonts Summary: %{fontname} verdana ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-verdana-fonts Microsoft verdana font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack/, updated in the European Union Expansion Update circa May 2007, still available on the Microsoft website. %_font_pkg -n verdana -f *-%{fontname}-verdana.conf Verdana*.ttf %package -n %{fontname}-andale-fonts Summary: %{fontname} Andale Mono ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-andale-fonts Andale Mono font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n andale -f *-%{fontname}-andale.conf AndaleMo.TTF %package -n %{fontname}-comic-fonts Summary: %{fontname} comic ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-comic-fonts Comic bold and regular font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n comic -f *-%{fontname}-comic.conf Comic*.TTF %package -n %{fontname}-courier-fonts Summary: %{fontname} courier ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-courier-fonts Courier bold, bold italic, italic and regular font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n courier -f *-%{fontname}-courier.conf cour*ttf %package -n %{fontname}-georgia-fonts Summary: %{fontname} georgia ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-georgia-fonts Georgia font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n georgia -f *-%{fontname}-georgia.conf Georgi*TTF %package -n %{fontname}-impact-fonts Summary: %{fontname} impact ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-impact-fonts Impact font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n impact -f *-%{fontname}-impact.conf Impact.TTF %package -n %{fontname}-webdings-fonts Summary: %{fontname} webdings ttf font Requires: %{name}-common = %{version}-%{release} %description -n %{fontname}-webdings-fonts Webdings font for the web that prior to 2002 was available from http://www.microsoft.com/typography/fontpack. %_font_pkg -n webdings -f *-%{fontname}-webdings.conf Webdings.TTF %prep %setup -cT cabextract %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} sed -i 's/\r//' Licen.TXT touch -r Licen.TXT timestamp iconv -f iso8859-1 -t utf-8 Licen.TXT > Licen.TXT.conv && \ mv -f Licen.TXT.conv Licen.TXT touch -r timestamp Licen.TXT %build %install install -d $RPM_BUILD_ROOT/%{fontdir} install -m 644 -p *.ttf *.TTF $RPM_BUILD_ROOT/%{fontdir} install -m 0755 -d $RPM_BUILD_ROOT%{_fontconfig_templatedir} \ $RPM_BUILD_ROOT%{_fontconfig_confdir} for fontconf in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \ %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} do install -m 0644 -p $fontconf %{buildroot}%{_fontconfig_templatedir} basename=$( basename $fontconf ) ln -s %{_fontconfig_templatedir}/$basename \ %{buildroot}%{_fontconfig_confdir}/$basename done 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 %files common %doc Licen.TXT %config(noreplace) /etc/X11/xorg.conf.d/09-msttcore-fontpath.conf %files %changelog * Mon Feb 10 2014 Alec Leamas - 1.0-1 - Based on previous work available at https://downloads.sourceforge.net/project/mscorefonts2/specs/msttcore-fonts-2.1-2.spec - Adapting to lpf, don't download in scriptlets. - Fedora GL: package each font in separate sub-package. - Fedora GL: Base on font package template - Fedora GL: Rename using offical fedora -fonts suffix - Purging changelog