File ipa-ex-fonts.spec of Package ipa-ex-fonts

#
# spec file for package ipa-ex-fonts
#
# Copyright (c) 2012 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:           ipa-ex-fonts
Version:        001.02
Release:        0
%define	ttf_fontdir     %{_datadir}/fonts/truetype
Summary:        Scalable Japanese TrueType fonts made by IPA
License:        IPA
Group:          System/X11/Fonts
Url:            http://ossipedia.ipa.go.jp/ipafont/
Source0:        IPAexfont00102.tar.bz2
BuildRequires:  dos2unix
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Japanese TrueType fonts made by IPA (Information-technology Promotion Agency).

%package -n ipa-ex-gothic-fonts
Summary:        Scalable "Gothic" Japanese TrueType font made by IPA
Group:          System/X11/Fonts
Provides:       IPAexGothic = %{version}
Provides:       scalable-font-ja
Provides:       locale(ja)
Obsoletes:      IPAexGothic <= 001.02

%description -n ipa-ex-gothic-fonts
"Gothic" Japanese TrueType font made by IPA (Information-technology Promotion Agency).

%package -n ipa-ex-mincho-fonts
Summary:        Scalable "Mincho" Japanese TrueType font made by IPA
Group:          System/X11/Fonts
Provides:       IPAexMincho = %{version}
Provides:       scalable-font-ja
Provides:       locale(ja)
Obsoletes:      IPAexMincho <= 001.02

%description -n ipa-ex-mincho-fonts
"Mincho" Japanese TrueType font made by IPA (Information-technology Promotion Agency).

%prep
%setup -q -n IPAexfont00102

%build
for i in *.txt
do
    dos2unix $i
done

%install
mkdir -p %{buildroot}%{ttf_fontdir}
for i in *.ttf
do
    install -m 644 $i %{buildroot}%{ttf_fontdir}
done

%clean
rm -rf %{buildroot};

%post -n ipa-ex-gothic-fonts
%run_suseconfig_fonts -c

%postun -n ipa-ex-gothic-fonts
%run_suseconfig_fonts -c

%post -n ipa-ex-mincho-fonts
%run_suseconfig_fonts -c

%postun -n ipa-ex-mincho-fonts
%run_suseconfig_fonts -c

%files -n ipa-ex-gothic-fonts
%defattr(-,root,root)
%doc *.txt
%dir %{ttf_fontdir}/
%{ttf_fontdir}/ipaexg.*

%files -n ipa-ex-mincho-fonts
%defattr(-,root,root)
%doc *.txt
%dir %{ttf_fontdir}/
%{ttf_fontdir}/ipaexm.*

%changelog
openSUSE Build Service is sponsored by