%define has_windows_license 1 %define fontdir %{_datadir}/fonts/%{name} Name: msttcorefonts Summary: TrueType core fonts for the web Version: 1.0 Release: 1 License: Spec file is GPL, binary rpm is gratis but non-distributable Group: User Interface/X URL: http://corefonts.sourceforge.net #Source: msttcorefonts.tar.gz # From http://dl.sourceforge.net/sourceforge/corefonts BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: wget, cabextract Requires(post): fontconfig Requires(postun): fontconfig %description The TrueType core fonts for the web that was once available from http://www.microsoft.com/typography/fontpack. This is totally legal for someone who already has a MS Windows license. %prep rm -rf %{_builddir}/%{name} mkdir -p %{_builddir}/%{name} cd %{_builddir}/%{name} for font in andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe georgi32.exe \ impact32.exe times32.exe trebuc32.exe verdan32.exe webdin32.exe; do wget -N http://easynews.dl.sourceforge.net/sourceforge/corefonts/$font done %if 0%{has_windows_license} wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB %endif %build cd %{_builddir}/%{name} mkdir cab-contents for f in *.exe *.CAB; do if [ -f $f ]; then cabextract --lowercase --directory=cab-contents $f fi done %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{fontdir} cd %{_builddir}/%{name} cp cab-contents/*.ttf $RPM_BUILD_ROOT/%{fontdir} touch $RPM_BUILD_ROOT%{fontdir}/{fonts.{dir,scale,cache-1},encodings.dir} %clean rm -rf $RPM_BUILD_ROOT %post %{_bindir}/fc-cache -f %{fontdir} ||: %postun if [ $1 -eq 0 ]; then # on final removal (not upgrade) %{_bindir}/fc-cache -f %{fontdir} || : fi %files %defattr(644,root,root,755) %dir %{fontdir} %{fontdir}/*.ttf %{fontdir}/fonts.dir %{fontdir}/fonts.scale %{fontdir}/encodings.dir %ghost %{fontdir}/fonts.cache-1 %changelog * Fri Feb 24 2006 Aurelien Bompard 1.0-1 - make it download the fonts at build time * Tue Apr 27 2004 Aurelien Bompard 0:1.0-0.fdr.2 - Xft2 only * Tue Apr 20 2004 Aurelien Bompard 0:1.0-0.fdr.1 -initial private release