File ipa-fonts.spec of Package ipa-fonts

#
# spec file for package ipa-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-fonts
Version:        003.02
Release:        0
Summary:        Japanese TrueType font made by IPA
License:        IPA
Group:          System/X11/Fonts
%define	ttf_fontdir     /usr/share/fonts/truetype
Url:            http://ossipedia.ipa.go.jp/ipafont/
Source0:        IPAfont00302.tar.bz2
BuildRequires:  dos2unix
Requires(pre):  %suseconfig_fonts_prereq
Provides:       scalable-font-ja
Provides:       locale(ja)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

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

%package -n ipa-pgothic-fonts
Summary:        "Proportional Gothic" Japanese TrueType font made by IPA
Group:          System/X11/Fonts
Provides:       IPAPGothic = %{version}
Provides:       scalable-font-ja
Provides:       locale(ja)
Obsoletes:      IPAPGothic <= 003.02

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

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

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

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

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

%package -n ipa-pmincho-fonts
Summary:        "Proportional Mincho" Japanese TrueType font made by IPA
Group:          System/X11/Fonts
Provides:       IPAPMincho = %{version}
Provides:       scalable-font-ja
Provides:       locale(ja)
Obsoletes:      IPAPMincho <= 003.02

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

%prep
%setup -q -n IPAfont00302

%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

%post -n ipa-pgothic-fonts
%run_suseconfig_fonts -c

%postun -n ipa-pgothic-fonts
%run_suseconfig_fonts -c

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

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

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

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

%post -n ipa-pmincho-fonts
%run_suseconfig_fonts -c

%postun -n ipa-pmincho-fonts
%run_suseconfig_fonts -c

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

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

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

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

%changelog
openSUSE Build Service is sponsored by