7e48cf3
%global fontname tulrich-tuffy
7e48cf3
%global fontconf 60-%{fontname}.conf
7e48cf3
7e48cf3
Name:           %{fontname}-fonts
7e48cf3
Version:        1.1
e9babe4
Release:        4%{?dist}
7e48cf3
Summary:        Generic sans font
7e48cf3
7e48cf3
Group:          User Interface/X
7e48cf3
License:        Public Domain
7e48cf3
URL:            http://tulrich.com/fonts/
7e48cf3
Source0:        http://tulrich.com/fonts/tuffy-20071106.tar.gz
7e48cf3
Source1:        %{name}-fontconfig.conf
7e48cf3
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
7e48cf3
7e48cf3
BuildArch:      noarch
7e48cf3
BuildRequires:  fontpackages-devel
7e48cf3
BuildRequires:  fontforge
7e48cf3
Requires:       fontpackages-filesystem
7e48cf3
7e48cf3
%description
7e48cf3
Tuffy is an innocuous looking sans font.
7e48cf3
7e48cf3
%prep
7e48cf3
%setup -q -n tuffy-20071106
7e48cf3
7e48cf3
%build
7e48cf3
# be really sure that we don't package pre-generated ttf files
7e48cf3
rm *.ttf
7e48cf3
# We use the legacy font forge script to generate the TTF files (instead of a 
7e48cf3
# Python one) because of bug 489109.
7e48cf3
fontforge -lang=ff -script "-" *.sfd <<"EOF"
7e48cf3
i = 1
7e48cf3
while ( i < $argc )
7e48cf3
  Open ($argv[i], 1)
7e48cf3
  Generate ($fontname + ".ttf")
7e48cf3
  PrintSetup (5)
7e48cf3
  PrintFont (0, 0, "", $fontname + "-sample.pdf")
7e48cf3
  Close()
7e48cf3
  i++
7e48cf3
endloop
7e48cf3
EOF
7e48cf3
7e48cf3
7e48cf3
%install
7e48cf3
rm -fr %{buildroot}
7e48cf3
7e48cf3
install -m 0755 -d %{buildroot}%{_fontdir}
7e48cf3
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
7e48cf3
7e48cf3
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
7e48cf3
                   %{buildroot}%{_fontconfig_confdir}
7e48cf3
7e48cf3
install -m 0644 -p %{SOURCE1} \
7e48cf3
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
7e48cf3
ln -s %{_fontconfig_templatedir}/%{fontconf} \
7e48cf3
      %{buildroot}%{_fontconfig_confdir}/%{fontconf}
7e48cf3
7e48cf3
7e48cf3
%clean
7e48cf3
rm -fr %{buildroot}
7e48cf3
7e48cf3
7e48cf3
%_font_pkg -f %{fontconf} *.ttf
7e48cf3
7e48cf3
%doc LICENSE.txt
7e48cf3
7e48cf3
7e48cf3
%changelog
e9babe4
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-4
e9babe4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e9babe4
7e48cf3
* Tue Mar 31 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1-3
7e48cf3
- Change fontconfig file to use "sans-serif" generic.
7e48cf3
7e48cf3
* Sat Mar 07 2009 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.1-2
7e48cf3
- Modified fontforge script to make it compatible with rawhide fontforge
7e48cf3
7e48cf3
* Tue Feb 24 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1-1
7e48cf3
- Initial package
7e48cf3