%define fontname textar
%define _fontdir %{_datadir}/fonts/OpenType-%{fontname}

Name: OpenType-%{fontname}
Summary:  A Japanese proportional font for Shift_JIS art
Summary(ja): Shift_JIS アートのための日本語プロポーショナルフォント
Epoch: 1
Version: 0.2
Release: 2%{?_dist_release}
License: IPA font license
Group: User Interface/X
URL: http://code.google.com/p/textar-font/

Source0: %{fontname}-font-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch

Requires: OpenType-%{fontname}-doc

%description
Textar Font is a japanese propotional font, derived from 
the IPA PGothic font ver.3.02.
It aims to represent Shift_JIS art graphics properly, 
almost all of which require the MS PGothic font.

- textar.otf
- textar-min.ttf (covered only level1/2 kanji character)

%description -l ja
Textarフォントは、IPA Pゴシックフォント ver.3.02に由来する
日本語プロポーショナルフォントです。
これは、MS Pゴシックフォントを必要とするほとんどすべての
Shift_JIS アートグラフィックを適切に表示することを目的としています。

- textar.otf
- textar-min.ttf (第一/第二水準の漢字のみカバー)

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

%description doc
This package includes important documents for textar font
includes enduser license.

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


%prep
%setup -qn %{fontname}-font-%{version}
rm -rf src/ipagp.ttf
rm -rf files/%{fontname}.ttf
%__tar cjf src-%{fontname}.tar.bz2 src/

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

%build

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_fontdir}
cp -a files/*.[ot]tf %{buildroot}%{_fontdir}

%post
%__font_install_post %{_fontdir}

%postun
%__font_install_postun %{_fontdir}

%files
%{_fontdir}/%{fontname}.otf
%{_fontdir}/%{fontname}-min.ttf

%files doc
%doc IPA_Font_License_Agreement_v1.0.txt README README_JA
%doc src-*.bz2

%changelog
* Sun Jan 12 2014 TANAKA hiroaki <mosaicist@jcom.home.ne.jp> 0.2-2
- rebuilt with gcc-4.8

* Sat May 14 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.2-1
- new upstream release
- added Epoch:1
- fixed typo in %%changelog 

* Thu Jan 6 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.11-1
- initial build for VineSeed