File takao-fonts.spec of Package takao-fonts

#
# spec file for package takao-fonts (Version 003.02.01 )
#
# Copyright (c) 2010 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/
#

# norootforbuild
%define ttf_fontdir /usr/share/fonts/truetype

Name:           TakaoPGothic-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Group:          System/X11/Fonts
AutoReqProv:    on
Summary:        "Proportional Gothic" Japanese TrueType font based on IPA fonts.
Url:		    https://launchpad.net/takao-fonts
Version:        003.02.01
Release:        1
#Provides:      scalable-font-ja
#Provides:      locale(ja)
Source0:        takao-fonts-ttf-%{version}.tar.bz2
Source1:        takao-fonts-additions-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  xorg-x11-devel

%description
"Proportional Gothic" Japanese TrueType font based on IPA fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%package -n TakaoGothic-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Summary:        "Gothic" Japanese TrueType font based on IPA fonts.
Group:          System/X11/Fonts
#Provides:      scalable-font-ja
#Provides:      locale(ja)

%description -n TakaoGothic-fonts
"Gothic" Japanese TrueType font based on IPA fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%package -n TakaoMincho-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Summary:        "Mincho" Japanese TrueType font based on IPA fonts.
Group:          System/X11/Fonts
#Provides:      scalable-font-ja
#Provides:      locale(ja)

%description -n TakaoMincho-fonts
"Mincho" Japanese TrueType font based on IPA fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%package -n TakaoPMincho-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Summary:        "Proportional Mincho" Japanese TrueType font based on IPA fonts.
Group:          System/X11/Fonts
#Provides:      scalable-font-ja
#Provides:      locale(ja)

%description -n TakaoPMincho-fonts
"Proportional Mincho" Japanese TrueType font based on IPA fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%package -n TakaoExGothic-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Summary:        "Gothic" Japanese TrueType font based on IPAex fonts.
Group:          System/X11/Fonts
#Provides:      scalable-font-ja
#Provides:      locale(ja)

%description -n TakaoExGothic-fonts
"Gothic" Japanese TrueType font based on IPAex fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%package -n TakaoExMincho-fonts
License:        Other uncritical OpenSource License  ; see IPA_Font_License_Agreement_v1.0.txt
Summary:        "Mincho" Japanese TrueType font based on IPAex fonts.
Group:          System/X11/Fonts
#Provides:      scalable-font-ja
#Provides:      locale(ja)

%description -n TakaoExMincho-fonts
"Mincho" Japanese TrueType font based on IPAex fonts provided by IPA
 (Information-technology Promotion Agency) and maintained by Takao Fonts Maintainers.

%prep
%setup -q -n takao-fonts-ttf-%{version}
cp %{SOURCE1} .

%build

%install
mkdir -p $RPM_BUILD_ROOT%{ttf_fontdir}
for i in *.ttf
do
    install -m 644 $i $RPM_BUILD_ROOT%{ttf_fontdir}
done
mkdir -p $RPM_BUILD_ROOT/etc/fonts/conf.avail
mkdir -p $RPM_BUILD_ROOT/etc/fonts/conf.d

%clean
rm -rf $RPM_BUILD_ROOT;

%post 
%run_suseconfig_fonts -c

%postun 
%run_suseconfig_fonts -c

%post -n TakaoGothic-fonts
%run_suseconfig_fonts -c

%postun -n TakaoGothic-fonts
%run_suseconfig_fonts -c

%post -n TakaoMincho-fonts
%run_suseconfig_fonts -c

%postun -n TakaoMincho-fonts
%run_suseconfig_fonts -c

%post -n TakaoPMincho-fonts
%run_suseconfig_fonts -c

%postun -n TakaoPMincho-fonts
%run_suseconfig_fonts -c

%post -n TakaoExGothic-fonts
%run_suseconfig_fonts -c

%postun -n TakaoExGothic-fonts
%run_suseconfig_fonts -c

%post -n TakaoExMincho-fonts
%run_suseconfig_fonts -c

%postun -n TakaoExMincho-fonts
%run_suseconfig_fonts -c

%files
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoPGothic.*
/etc/fonts

%files -n TakaoGothic-fonts
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoGothic.*
/etc/fonts

%files -n TakaoMincho-fonts
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoMincho.*
/etc/fonts

%files -n TakaoPMincho-fonts
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoPMincho.*
/etc/fonts

%files -n TakaoExGothic-fonts
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoExGothic.*
/etc/fonts

%files -n TakaoExMincho-fonts
%defattr(-,root,root)
%doc *.txt README* ChangeLog
%dir %{ttf_fontdir}/
%{ttf_fontdir}/TakaoExMincho.*
/etc/fonts

%changelog
* Fri Apr 16 2010 - Satoru Matsumoto <HeliosReds@opensuse.org>
  - Update for Takao Fonts version 003.02.01 and
    Takao Ex Fonts version 001.01.01

* Fri Feb 26 2010 - Satoru Matsumoto <HeliosReds@opensuse.org>  
  - renamed extension of the fonts from .otf to .ttf.
  - added README.SUSE* files.
openSUSE Build Service is sponsored by