%define fontname migmix
%define _fontname MigMix
%define _fontdir %{_datadir}/fonts/TrueType-%{fontname}

Name: TrueType-%{fontname}
Summary: MigMix fonts are combined fonts that use IPA and M+ fonts
Summary(ja): M+とIPAの合成フォント MigMix フォント
Version: 20130430
Release: 1%{?_dist_release}
License: IPA Font License
Group: User Interface/X
URL: http://mix-mplus-ipa.sourceforge.jp/migmix/

Source0: %{_fontname}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
Requires: TrueType-%{fontname}-doc

BuildRequires: xz

%description
MigMix font are combined fonts that use IPA Gothic and M+ fonts.
See below in package contens.

- MigMix-1M-bold.ttf
- MigMix-1P-bold.ttf
- MigMix-1M-regular.ttf
- MigMix-1P-regular.ttf

- MigMix-2M-bold.ttf
- MigMix-2P-bold.ttf
- MigMix-2M-regular.ttf
- MigMix-2P-regular.ttf

%description -l ja
MigMix（ミグミックス）フォントは、IPA ゴシックと
M+ フォントの合成フォントです。
パッケージの内容は、以下を参照してください。

- MigMix-1M-bold.ttf
- MigMix-1P-bold.ttf
- MigMix-1M-regular.ttf
- MigMix-1P-regular.ttf

- MigMix-2M-bold.ttf
- MigMix-2P-bold.ttf
- MigMix-2M-regular.ttf
- MigMix-2P-regular.ttf

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

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

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


%prep
%setup -q -n %{_fontname}-%{version}

%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 $RPM_BUILD_ROOT%{_fontdir}
cp -a *.ttf $RPM_BUILD_ROOT%{_fontdir}

%post
%__font_install_post %{_fontdir}

%postun
%__font_install_postun %{_fontdir}

%files
%{_fontdir}/*.ttf

%files doc
%doc ipag0030*/*.txt migmix-README.txt

%changelog
* Wed May 01 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20130430-1
- new upstream release

* Fri Nov 02 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20121030-1
- new upstream release

* Sat Jul 28 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20120411-2
- removed M plus Font License
  - because IPA font Lisence do not coexist other lisence
    (http://d.hatena.ne.jp/itouhiro/20120607)

* Wed Apr 25 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20120411-1
- new upstream release

* Wed Oct 05 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20111002-1
- new upstream release

* Sat Aug 27 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20110825-1
- new upstream release
- changed source archive type
  - bzip2 to xz
  - added BuildRequires: xz

* Tue Jun 07 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20110514-1
- new upstream release

* Fri Apr 29 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20110418-1
- new upstream release

* Sat Feb 26 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20110207-1
- initial build for VineSeed
