LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File chinese-fonts-setting.spec of Package chinese-fonts-setting (Project home:swyear)

Name:  chinese-fonts-setting
Version:  1.0
Release:  1
License:  GPL
Group: System/X11/Fonts
BuildArch:  noarch
Summary: Chinese fonts setting
Source0: 20-minimal-font-size.conf
Source1: 57-kai-hei-hei.conf
Source2: 57-kai-sung-sung.conf
Source3: 57-kai.conf
Source4: 57-sung.conf
Source5: 57-hei.conf
Source6: 57-kde4-bitmap.conf
Source7: 30-fake-bold-dont-antialias.conf
BuildRoot:  %{_builddir}/%{name}-%{version}-root

%description
Chinese fonts setting for Kai, Sung, Hei styles.
%if %suse_version < 1110
%package kai-hei-hei
Summary: Chinese font setting for Hei-style
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description kai-hei-hei
Use Kai-style as default font family for serif,
hei-style as default font family for sans and monospace.

%package kai-sung-sung
Summary: Chinese font setting default style
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description kai-sung-sung
Use Kai-style as default font family for serif,
sung-style as default font family for sans and monospace.
This is a default setting.

%package kai
Summary: Chinese font setting for Kai-style
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description kai
Use Kai-style as default font for all families (serif, sans, monospace)

%package sung
Summary: Chinese font setting for Sung-style
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description sung
Use Sung-style as default font for all families (serif, sans, monospace)

%package kde4-bitmap
Summary: Use bitmap-fonts in KDE4
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description kde4-bitmap
KDE4 is not yet support embedded-bitmap fonts,here set antialias disabled in some Chinese fonts with embedded-bitmap to work around

%package hei
Summary: Chinese font setting for Hei-style
Group: System/X11/Fonts
Requires: chinese-fonts-setting

%description hei
Use Hei-style as default font for all families (serif, sans, monospace)
%endif

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/fonts/conf.avail/
install -m 644 $RPM_SOURCE_DIR/*.conf $RPM_BUILD_ROOT/etc/fonts/conf.avail/
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/chinese-fonts-setting/
install -m 644 $RPM_SOURCE_DIR/*.README $RPM_BUILD_ROOT/usr/share/doc/packages/chinese-fonts-setting/

%files
%defattr(-,root,root,0755)
%doc /usr/share/doc/packages/chinese-fonts-setting/*.README
%dir /etc/fonts
%dir /etc/fonts/conf.avail
%dir /usr/share/doc/packages/chinese-fonts-setting
/etc/fonts/conf.avail/*.conf

%if %suse_version < 1110
%files kai-hei-hei

%files kai-sung-sung

%files kai

%files sung

%files kde4-bitmap

%files hei
%endif

%post
%if %suse_version < 1110
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-sung.conf 57-chinese-fonts-setting.conf
%endif
#%if %suse_version == 1100
#ln -sf ../conf.avail/57-kde4-bitmap.conf 57-kde4-bitmap.conf
#%endif
%if %suse_version < 1110
%post kai-hei-hei
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-kai-hei-hei.conf 57-chinese-fonts-setting.conf

%post kai-sung-sung
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-kai-sung-sung.conf 57-chinese-fonts-setting.conf

%post kai
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-kai.conf 57-chinese-fonts-setting.conf

%post sung
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-sung.conf 57-chinese-fonts-setting.conf

%post kde4-bitmap
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-kde4-bitmap.conf 57-kde4-bitmap.conf

%post hei
cd /etc/fonts/conf.d/
ln -sf ../conf.avail/57-hei.conf 57-chinese-fonts-setting.conf
%endif
%changelog