File freefont.spec of Package freefont

#
# spec file for package freefont
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           freefont
BuildRequires:  fontforge >= 20080429 python
%define	ttf_fontdir     /usr/share/fonts/truetype
License:        GPLv2+
Group:          System/X11/Fonts
Provides:       scalable-font-el, scalable-font-he, scalable-font-ru, scalable-font-bg
PreReq:         %suseconfig_fonts_prereq
Provides:       locale(bg;el;he;ru;vi)
Version:        0.20110523
Release:        1
Url:            http://savannah.nongnu.org/projects/freefont/
#    cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/freefont login
#    (hit Enter)
#    cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/freefont co  freefont
#    tar jcvf freefont-0.20080323.tar.bz2 freefont/
Source0:        %{name}-%{version}.tar.bz2
Source10:       remove-kana-glyphs
# TODO: remove GenerateTrueType script from previous version (20080323) as soon as the new one is working
Source11:       GenerateTrueType
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Free UCS Outline Fonts

%description
A set of free outline (OpenType, for example) fonts covering the ISO
10646/Unicode UCS (Universal Character Set). The set consists of three
typefaces: one monospaced and two proportional (one with uniform and
one with modulated stroke).

%prep
%setup -n freefont
find . -name CVS -type d | xargs rm -rf

%build
cp %{S:11} ./tools
chmod 755 $RPM_SOURCE_DIR/remove-kana-glyphs
$RPM_SOURCE_DIR/remove-kana-glyphs ./sfd/*.sfd
fontforge -lang=ff -script ./tools/GenerateTrueType *.sfd

%install
mkdir -p $RPM_BUILD_ROOT%{ttf_fontdir}/
install -c -m 644 *.ttf $RPM_BUILD_ROOT%{ttf_fontdir}/

%post
%run_suseconfig_fonts

%postun
%run_suseconfig_fonts

%files 
%defattr(-, root,root)
%doc AUTHORS CREDITS ChangeLog INSTALL README
%doc papers/
%{ttf_fontdir}

%changelog
openSUSE Build Service is sponsored by