%define texmf           %{_prefix}/share/texmf
%define build_texmf     %{buildroot}%{texmf}

%define exec_texhash    [ -x %{_bindir}/texhash    ] && PATH=%{_bindir}:$PATH %{_bindir}/texhash 2> /dev/null
%define exec_updmap     [ -x %{_bindir}/updmap-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/updmap 2> /dev/null

Summary: TIPA (International Phonetic Alphabet for LaTeX)
Summary(ja): TIPA (LaTeX 用の音声記号フォント)
Name: tipa
Version: 1.3
Release: 1%{?_dist_release}
Group: Applications/Publishing 
License: LaTeX Project Public License
URL: http://www.l.u-tokyo.ac.jp/~fkr/tipa/
Source: http://www.l.u-tokyo.ac.jp/~fkr/tipa/tipa-1.3.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: tetex
Requires: tetex
Vendor: Project Vine
Distribution: Vine Linux
Packager: IKEDA Katsumi <ikeda@webmasters.gr.jp>

%description
TIPA is a system for processing IPA (International Phonetic Alphabet) symbols
in LaTeX. TIPA stands for TeX IPA or Tokyo IPA.


%description -l ja
TIPA は LaTeX で IPA (国際音標文字/発音記号) を処理するためのシステムです。
TIPA という名前は TeX IPA や Tokyo IPA を意味しています。

%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT

# Don't mind the error messages about type1/*.afm and mktexlsr.
make PREFIX=%{build_texmf} MAPDIR=%{build_texmf}/fonts/map/dvips install

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{exec_texhash}
%{exec_updmap} --enable Map tipa.map
exit 0

%postun
if [ "$1" = 0 ]; then
    %{exec_texhash}
    %{exec_updmap} --disable tipa.map
fi
exit 0

%files
%defattr(-,root,root)
%doc 00README Manifest.txt Makefile doc/
%{texmf}/tex/latex/tipa/
%{texmf}/fonts/source/fkr/tipa/
%{texmf}/fonts/tfm/fkr/tipa/
%{texmf}/fonts/type1/fkr/tipa
%{texmf}/fonts/map/dvips/tipa.map

%changelog
* Sun Oct 12 2008 Shu KONNO <owa@bg.wakwak.com> 1.3-1vl5
- applied new versioning policy, spec in utf-8

* Sat Sep  9 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3-0vl3
- changed exec_updmap (applyed Tsuchimura-san's patch)

* Thu Aug 17 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3-0vl2
- rebuilt for VineSeed (4.0)

* Mon Apr 25 2005 IKEDA Katsumi <ikeda@webmasters.gr.jp> 1.3-0vl1
- Initial specfile.
