cjkuni-uming-fonts-ttf/cjkuni-uming-fonts-ttf.spec

116 lines
3.8 KiB
RPMSpec

# openkdj default directory ... or create a new fontconfig.properties.src... fontconfig.%{vendor}.properties.src
%define fontdir %{_datadir}/fonts/chinese/TrueType
Name: cjkuni-uming-fonts-ttf
Version: 0.2.20080216.1
Release: 6mamba
Summary: Chinese Unicode TrueType font in Ming face
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.freedesktop.org/wiki/Software/CJKUnifonts
Source0: http://ftp.de.debian.org/debian/pool/main/t/ttf-arphic-uming/ttf-arphic-uming_%{version}.orig.tar.gz
Source1: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming.conf
Source2: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming-render.conf
Source3: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming-embolden.conf
Patch0: chinese-fonts-ttf-0.2.20080216.1-enable_symbol_antialiasing.patch
Patch1: cjkuni-uming-fonts-ttf-0.2.20080216.1-libfontconfig-2.10.patch
License: Arphic Public License
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
#BuildRequires: ttmkfdir
#BuildRequires: mkfontdir
Obsoletes: chinese-fonts-ttf
Provides: chinese-fonts-ttf
Provides: cjkuni-uming-ttf-fonts
Obsoletes: cjkuni-uming-ttf-fonts
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
CJK Unifonts are Unicode TrueType fonts derived from original fonts made available by Arphic Technology under "Arphic Public License" and extended by the CJK Unifonts project.
%prep
%setup -q -c %{name}-%{version}
%patch0 -p1
%patch1 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{fontdir} %{buildroot}%{_sysconfdir}/fonts/{conf.d,conf.avail}
install -m0644 *.ttc %{buildroot}%{fontdir}/
#(
# cd %{buildroot}%{fontdir}
# ln -sf uming.ttc uming.ttf
#)
install -m0644 *.conf %{buildroot}%{_sysconfdir}/fonts/conf.avail/
pushd %{buildroot}%{_sysconfdir}/fonts/conf.avail
for f in *.conf; do
ln -s ../conf.avail/$f ../conf.d/$f
done
popd
# don't install configuration which sets this font as default for serif, sans-serif and monospace
rm -f %{buildroot}%{_sysconfdir}/fonts/conf.d/41-ttf-arphic-uming.conf
install -m0644 fonts.dir %{buildroot}%{fontdir}/
install -m0644 fonts.scale %{buildroot}%{fontdir}/
#ttmkfdir -d %{buildroot}%{fontdir} -o %{buildroot}%{fontdir}/fonts.scale
#mkfontdir %{buildroot}%{fontdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
:
%postun
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/fonts/conf.avail/*arphic-uming*.conf
%{_sysconfdir}/fonts/conf.d/*arphic-uming*.conf
%dir %{fontdir}
%{fontdir}/uming.*
%{fontdir}/fonts.dir
%{fontdir}/fonts.scale
%doc license
#%doc CONTRIBUTERS FONTLOG Font_Comparison_ShanHeiSun_UMing.*
#%doc INSTALL KNOWN_ISSUES NEWS README* TODO license
%changelog
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-6mamba
- don't install fontconfig file which makes this font default for serif,sans-serif and monospace
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-5mamba
- added patch to fix warnings with fontconfig >= 2.10
* Mon Mar 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-4mamba
- rename from cjkuni-uming-ttf-fonts to cjkuni-uming-fonts-ttf
* Mon Feb 21 2011 gil <puntogil@libero.it> 0.2.20080216.1-3mamba
- rebuilt
* Wed Feb 16 2011 gil <puntogil@libero.it> 0.2.20080216.1-2mamba
- obsoletes chinese-fonts-ttf
- apply chinese-fonts-ttf-0.2.20080216.1-enable_symbol_antialiasing.patch
* Mon Jan 24 2011 gil <puntogil@libero.it> 0.2.20080216.1-1mamba
- package created by autospec