%define _fontdir %{_datadir}/fonts/TrueType-croscore

Name: TrueType-croscore
Summary: The width-compatible fonts for improved on-screen readability
Summary(ja): オンスクリーンでの可読性改善のための width-compatible フォント
Version: 1.23.0
Release: 1%{?_dist_release}
License: OFL
Group: User Interface/X
#URL: http://gsdview.appspot.com/chromeos-localmirror/distfiles/
Source0: http://gsdview.appspot.com/chromeos-localmirror/distfiles/croscorefonts-%{version}.tar.gz
Source1: LICENSE
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildArch: noarch
Requires: TrueType-croscore-doc = %{version}
Requires: TrueType-croscore-sans = %{version}
Requires: TrueType-croscore-mono = %{version}
Requires: TrueType-croscore-serif = %{version}


%description
This package contains a collections of fonts that offers improved on-screen \
readability characteristics and the pan-European WGL character set and solves \
the needs of developers looking for width-compatible fonts to address document \
portability across platforms.


%package sans
Summary: croscore sans (Arimo) fonts
Summary(ja): croscore sans (Arimo) フォント
Group: User Interface/X
Requires: %{name}-doc

%description sans
This package includes croscore sans (Arimo) fonts.

%description -l ja sans
このパッケージには croscore sans (Arimo) フォントが
含まれています。


%package mono
Summary: croscore mono (Cousine) fonts
Summary(ja): croscore mono (Cousine) フォント
Group: User Interface/X
Requires: %{name}-doc

%description mono
This package includes croscore mono (Cousine) fonts.

%description -l ja mono
このパッケージには croscore mono (Cousine) フォントが
含まれています。


%package serif
Summary: croscore serif (Tinos, SymbolNeu) fonts
Summary(ja): croscore serif (Tinos, SymbolNeu) フォント
Group: User Interface/X
Requires: %{name}-doc

%description serif
This package includes croscore serif (Tinos, SymbolNeu) fonts.

%description -l ja serif
このパッケージには croscore serif (Tinos, SymbolNeu) フォントが
含まれています。


%package doc
Summary: croscore font Documents
Summary(ja): croscore フォントドキュメント
Group: User Interface/X

%description doc
This package includes important documents for croscore fonts 
includes enduser license.

%description -l ja doc
このパッケージには croscore フォントのライセンスを含む
ドキュメント類が含まれています。


%prep
%setup -q -n croscorefonts-%{version}
cp -p %{SOURCE1} .

%build

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_fontdir}
cp -a *.ttf $RPM_BUILD_ROOT%{_fontdir}

%clean
if test -n "${RPM_BUILD_ROOT}" && test "/" != "${RPM_BUILD_ROOT}"; then
    rm -rf ${RPM_BUILD_ROOT}
fi

%post sans
%__font_install_post %{_fontdir}

%post mono
%__font_install_post %{_fontdir}

%post serif
%__font_install_post %{_fontdir}

%postun sans
%__font_install_postun %{_fontdir}

%postun mono
%__font_install_postun %{_fontdir}

%postun serif
%__font_install_postun %{_fontdir}

%files

%files doc
%doc LICENSE

%files sans
%{_fontdir}/Arimo*.ttf

%files mono
%{_fontdir}/Cousine*.ttf

%files serif
%{_fontdir}/SymbolNeu.ttf
%{_fontdir}/Tinos*.ttf


%changelog
* Fri Nov 02 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.23.0-1
- new upstream release
- added Source1

* Fri Jul 27 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.21.0-1
- initial build for VineSeed
