%global fontname cwtex-q %global fontconf 65-0-%{fontname} %global archivename %{name}-TTFs-%{version} %global archivefontdir ttf %global common_desc \ The cwTeX fonts were originally created by Tsong-Min Wu and \ Tsong-Huey Wu from 1999-2004. The fonts was later organized \ and modified by Edward G.J. Lee from 2005-2007. \ cwtex-q-fonts project was run by Chen-Pan Liao since 2008.\ The goal is to modify cwTeX fonts to provide higher quality \ and comfort. Name: %{fontname}-fonts Version: 0.4 Release: 1%{?dist} Summary: General-purpose Traditional Chinese fonts released by Chen-Pan Liao License: GPLv2+ URL: https://github.com/l10n-tw/%{name} Source0: %{name}-TTFs-%{version}.tar.gz Source1: %{name}-yuan-fontconfig.conf Source2: %{name}-ming-fontconfig.conf Source3: %{name}-kai-fontconfig.conf Source4: %{name}-hei-fontconfig.conf Source5: %{name}-fangsong-fontconfig.conf BuildArch: noarch BuildRequires: fontpackages-devel Requires: fontpackages-filesystem %description %common_desc # Repeat for every font family %package -n %{fontname}-yuan-fonts Summary: A contemporary Chinese yuan (sans serif) typeface Requires: fontpackages-filesystem %description -n %{fontname}-yuan-fonts %common_desc The cwTeX Q Yuan font is a contemporary Chinese yaun (sans serif) typeface %_font_pkg -n yuan -f %{fontconf}-yuan.conf cwTeXQYuan-Medium.ttf %doc license.txt copying.txt %package -n %{fontname}-ming-fonts Summary: A contemporary Chinese ming (serif) typeface Requires: fontpackages-filesystem %description -n %{fontname}-ming-fonts %common_desc The cwTeX Q Ming font is a contemporary Chinese ming (serif) typeface %_font_pkg -n ming -f %{fontconf}-ming.conf cwTeXQMing-Medium.ttf %doc license.txt copying.txt %package -n %{fontname}-kai-fonts Summary: A contemporary Chinese kai (cursive) typeface Requires: fontpackages-filesystem %description -n %{fontname}-kai-fonts %common_desc The cwTeX Q Kai font is a contemporary Chinese kai (cursive) typeface %_font_pkg -n kai -f %{fontconf}-kai.conf cwTeXQKai-Medium.ttf %doc license.txt copying.txt %package -n %{fontname}-hei-fonts Summary: A contemporary Chinese hei (sans serif) typeface Requires: fontpackages-filesystem %description -n %{fontname}-hei-fonts %common_desc The cwTeX Q Hei font is a contemporary Chinese Hei (sans serif) typeface %_font_pkg -n hei -f %{fontconf}-hei.conf cwTeXQHei-Bold.ttf %doc license.txt copying.txt %package -n %{fontname}-fangsong-fonts Summary: A contemporary Chinese fangsong (serif) typeface Requires: fontpackages-filesystem %description -n %{fontname}-fangsong-fonts %common_desc The cwTeX Q Fangsong font is a contemporary Chinese fangsong (serif) typeface %_font_pkg -n fangsong -f %{fontconf}-fangsong.conf cwTeXQFangsong-Medium.ttf %doc license.txt copying.txt %prep %setup -q -n %{archivename} perl -i -pe 's/\r\n/\n/gs' license.txt %build %install install -m 0755 -d %{buildroot}%{_fontdir} install -m 0644 -p %{archivefontdir}/cwTeXQYuan-*.ttf %{buildroot}%{_fontdir} install -m 0644 -p %{archivefontdir}/cwTeXQMing-*.ttf %{buildroot}%{_fontdir} install -m 0644 -p %{archivefontdir}/cwTeXQKai-*.ttf %{buildroot}%{_fontdir} install -m 0644 -p %{archivefontdir}/cwTeXQHei-*.ttf %{buildroot}%{_fontdir} install -m 0644 -p %{archivefontdir}/cwTeXQFangsong-*.ttf %{buildroot}%{_fontdir} install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ %{buildroot}%{_fontconfig_confdir} # Repeat for every font family install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-yuan.conf install -m 0644 -p %{SOURCE2} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-ming.conf install -m 0644 -p %{SOURCE3} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-kai.conf install -m 0644 -p %{SOURCE4} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-hei.conf install -m 0644 -p %{SOURCE5} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-fangsong.conf for fconf in %{fontconf}-yuan.conf \ %{fontconf}-ming.conf \ %{fontconf}-kai.conf \ %{fontconf}-hei.conf \ %{fontconf}-fangsong.conf ; do ln -s %{_fontconfig_templatedir}/$fconf \ %{buildroot}%{_fontconfig_confdir}/$fconf done %changelog * Sun Nov 22 2015 Cheng-Chia Tseng - 0.4-1 - updated to 0.4 release. Note: Authors of Chinese part of cwtex-q-fonts agreed to dual-license the Chinese-part under GPLv2+ and OFL license. Because of OFL not being compatable with GPL, the separated ttf files only contain Chinese part released under OFL are named in cwTeXQ[FONT_TYPEFACE]ZH-*.ttf. This package only picks the GPLv2+ ones. * Sat Jun 28 2014 Cheng-Chia Tseng - 0.2-2 - fixed issues reported in package review * Sun Dec 29 2013 Cheng-Chia Tseng - 0.2-1 - initial version of the package