File wqy-bitmapfont.spec of Package wqy-bitmapfont

Name:           wqy-bitmapfont
%if %suse_version > 910
BuildRequires:  bdfresize freetype2 xorg-x11 xorg-x11-devel
%else
BuildRequires:  XFree86 XFree86-devel bdfresize freetype2
%endif
%if "%(xft-config --prefix)" == "/usr"
%define fontdir     /usr/share/fonts/Chinese/wqy-bitmapfont
%else
%define fontdir     /usr/X11R6/lib/X11/fonts/Chinese/wqy-bitmapfont
%endif
License:        GPL v2.0 (with font embedding exception **)
Group:          System/X11/Fonts
Autoreqprov:    on
Prereq:         %suseconfig_fonts_prereq
Summary:        Wen Quan Yi Bitmap Song CJK Fonts
Version:        0.9.9_0
Release:        1
URL:            http://wenq.org/
Source0:        wqy-bitmapfont-pcf-0.9.9-0.tar.gz
BuildRoot:      %{_builddir}/%{name}-%{version}-root
BuildArchitectures: noarch

%description
The Wen Quan Yi bitmap font includes complete CJK Unified 
Ideograph (U4E00 - U9FA5) glyphs at four different sizes 
(9pt-12X12 pixel, 10pt-13X13 pixel, 11pt-15X15 pixel, 
12pt-16x16 pixel) and two weights (medium and bold). 

Authors: The WenQuanYi Project Contributors

%prep
%setup -n wqy-bitmapfont

%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
mkdir -p %{buildroot}%{fontdir}
install -m 644 *.pcf %{buildroot}%{fontdir}
install -c -m 644 fonts.alias %{buildroot}%{fontdir}/fonts.scale
mkdir -p $RPM_BUILD_ROOT/etc/fonts/conf.avail/
install -c -m 644 85-wqy-bitmapsong.conf $RPM_BUILD_ROOT/etc/fonts/conf.avail/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/
cp LOGO.png $RPM_BUILD_ROOT/usr/share/icons/wqy-bitmapsong.png

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

%post
%run_suseconfig_fonts

%postun
%run_suseconfig_fonts

%files
%defattr(-, root,root)
%doc AUTHORS README COPYING ChangeLog INSTALL INSTALL.zh.gb2312
%dir %{fontdir}/
%{fontdir}/*.pcf
%{fontdir}/fonts.scale
/etc/fonts/conf.avail/85-wqy-bitmapsong.conf
/usr/share/icons/wqy-bitmapsong.png

%Changelog