# Adaptation of this script to SuSE Linux 8.1 # by Volker Kuhlmann Packager: Volker Kuhlmann Distribution: SuSE Linux 8.1 contrib URL: http://corefonts.sourceforge.net/ %define ver 1.3 %define rel 105 #%define prefix /usr # This is the msttcorefonts spec file as distributed from # http://corefonts.sourceforge.net/. Use it and enjoy! # corefonts@resare.com # some non-redhat users will need to change this. This is the info I've # gotten so far: # # mandrake 8.2 users should install the 'freetype-tools' package and change # the define below to '/usr/sbin/ttmkfdir' # # in redhat 8.0 the ttmkfdir util is is in the 'XFree86-font-utils' package # # If you needed to change this define in any other way, please email the # following info to corefonts@resare.com so that I can make future versions # better: # 1) Your distribution name and version. # 2) The correct path to ttmkfdir on your system # 3) The name of the package that holds ttmkfdir. You can check this by # running 'rpm -qf PATH_FROM_QUESTION_2' %define ttmkfdir /usr/bin/ttmkfdir # SuSE 8.1: package ttmkfdir %define ttmkfdir /usr/X11R6/bin/ttmkfdir # Set this define to "yes" if you have a windows license. This will install # the Tahoma font also (that is distributed under the ie license, which # requires a valid windows license) %define has_windows_license "yes" %define fontdir /usr/share/fonts/%{name} %define fontdir /usr/X11R6/lib/X11/fonts/%{name} WON'T WORK! %define fontdir /usr/X11R6/lib/X11/fonts/truetype # please select the server that is closest to you by replacing the first # '#' with a '%' one of the following lines. #define distserver http://osdn.dl.sourceforge.net/sourceforge/corefonts #define distserver http://telia.dl.sourceforge.net/sourceforge/corefonts %define distserver http://unc.dl.sourceforge.net/sourceforge/corefonts #define distserver http://umn.dl.sourceforge.net/sourceforge/corefonts #define distserver http://twtelecom.dl.sourceforge.net/sourceforge/corefonts #define distserver http://belnet.dl.sourceforge.net/sourceforge/corefonts %define name msttcorefonts Summary: TrueType core fonts for the web Name: %{name} Version: %{ver} Release: %{rel} License: Spec file is GPL, binary rpm is gratis but non-distributable #Group: User Interface/X Group: System/X11/Fonts BuildArch: noarch #BuildRoot: /var/tmp/%{name}-root BuildRoot: /tmp/%{name}-%{version}-%{release}-%(id -u -n) BuildPrereq: %{ttmkfdir} BuildPrereq: wget BuildPrereq: cabextract #Prereq: /usr/sbin/chkfontpath #Packager: Daniel Resare %description The TrueType core fonts for the web that was once available from http://www.microsoft.com/typography/fontpack/. The src rpm is cleverly constructed so that the actual fonts are downloaded from Sourceforge's site at build time. Therefore this package technically does not 'redistribute' the fonts, it just makes it easy to install them on a linux system. %prep rm -rf %{name} mkdir %{name} cd %{name} for i in andale32.exe webdin32.exe trebuc32.exe georgi32.exe verdan32.exe comic32.exe arialb32.exe impact32.exe arial32.exe times32.exe courie32.exe do wget %{distserver}/$i done if test "yes" = %{has_windows_license} then wget http://download.microsoft.com/download/ie55sp2/Install/5.5_SP2/WIN98Me/EN-US/IELPKTH.CAB fi %build umask 22 cd %{name} mkdir -p %{name}/cab-contents for i in *.exe *.CAB do if test -f $i then cabextract --lowercase --directory=cab-contents $i fi done mkdir fonts cd fonts cp -p ../cab-contents/*.ttf . #%{ttmkfdir} > fonts.dir WON'T WORK - overwritten by SuSEconfig %{ttmkfdir} -o fonts.scale.msttcorefonts %install test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT cd %{name}/fonts mkdir -p $RPM_BUILD_ROOT/%{fontdir} cp -p *.ttf fonts.* $RPM_BUILD_ROOT/%{fontdir} %clean test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT %post #if test $1 -eq 1 #then # /usr/sbin/chkfontpath --add %{fontdir} #fi # Not applicable if installed in /usr/X11R6/lib/X11/fonts/truetype #echo " #To make the X server and fontserver find the new fonts, add the line # FontPath \"%{fontdir}\" #to the Files section of your /etc/X11/XF86Config (or to /etc/XF86Config if you #still run the older XFree86 3.x), #and the line # %{fontdir}, #to the catalogue variable in /etc/X11/fs/config (if you add this as last line, #add the comma at the end to the previous line). #" #xset fp+ %{fontdir} 2>/dev/null || true xset fp rehash 2>/dev/null || true %preun #if test $1 -eq 0 #then # /usr/sbin/chkfontpath --remove %{fontdir} #fi # Not applicable if installed in /usr/X11R6/lib/X11/fonts/truetype #echo " #You may now remove the lines containing # %{fontdir} #from the files # /etc/X11/XF86Config # /etc/X11/fs/config #(if it was the last line of the catalog variable setting in the latter file, #remove the comma from the end of the previous line). #" #xset fp- %{fontdir} 2>/dev/null || true xset fp rehash 2>/dev/null || true %files %attr(-,root,root) %{fontdir} # we don't want x-bits set on any of the files thank you %changelog * Thu Jan 23 2003 Volker Kuhlmann - The previous way of installing the fonts worked but SuSEconfig would destroy it when run. Now using SuSEconfig's way of creating fonts.dir. * Fri Jan 03 2003 Volker Kuhlmann - minor improvements to spec file * Tue Nov 26 2002 Volker Kuhlmann - For SuSE 8.1; spec file adapted * Mon Nov 25 2002 Daniel Resare 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 1.3-2 - Microsoft released a new service-pack. New url for Tahoma font. * Thu Oct 24 2002 Daniel Resare 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 1.2-3 - fixed spec error when tahoma is not included * Tue Aug 27 2002 Daniel Resare 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 1.2-1 - changed distserver because microsoft no longer provides them * Tue Apr 09 2002 Daniel Resare 1.1-3 - fixed post/preun script to actually do what they were supposed to do * Tue Mar 12 2002 Daniel Resare 1.1-2 - removed cabextact from this package - added tahoma font from ie5.5 update * Fri Aug 25 2001 Daniel Resare - initial version