%define fontname liberation %define _fontdir %{_datadir}/fonts Name: %{fontname}-fonts Summary: Fonts to replace commonly used Microsoft Windows fonts Version: 1.06.0.20100721 Release: 1 # The license of the Liberation Fonts is a EULA that contains GPLv2 and two # exceptions: # The first exception is the standard FSF font exception. # The second exception is an anti-lockdown clause somewhat like the one in # GPLv3. This license is Free, but GPLv2 and GPLv3 incompatible. License: Liberation Group: User Interface/X URL: http://fedorahosted.org/liberation-fonts/ Source0: https://fedorahosted.org/releases/l/i/liberation-fonts/%{name}-ttf-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch %description This is just a dummy to satisfy RPM. %package -n %{fontname}-mono-fonts Summary: Monospace fonts to replace commonly used Microsoft Courier New Group: User Interface/X Requires: fontconfig %description -n %{fontname}-mono-fonts The Liberation Fonts are intended to be replacements for the three most commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier New. This is Monospace TrueType fonts that replaced commonly used Microsoft Courier New. %package -n %{fontname}-narrow-fonts Summary: Sans-serif Narrow fonts to replace commonly used Microsoft Arial Narrow Group: User Interface/X Requires: fontconfig %description -n %{fontname}-narrow-fonts The Liberation Fonts are intended to be replacements for the three most commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier New. This is Sans-Serif Narrow TrueType fonts that replaced commonly used Microsoft Arial Narrow. %package -n %{fontname}-sans-fonts Summary: Sans-serif fonts to replace commonly used Microsoft Arial Group: User Interface/X Requires: fontconfig %description -n %{fontname}-sans-fonts The Liberation Fonts are intended to be replacements for the three most commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier New. This is Sans-serif TrueType fonts that replaced commonly used Microsoft Arial. %package -n %{fontname}-serif-fonts Summary: Serif fonts to replace commonly used Microsoft Times New Roman Group: User Interface/X Requires: fontconfig %description -n %{fontname}-serif-fonts The Liberation Fonts are intended to be replacements for the three most commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier New. This is Serif TrueType fonts that replaced commonly used Microsoft Times New Roman. %prep %setup -q -n %{name}-ttf-%{version} %build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname} chmod 0755 ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname} cp *.ttf ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname}/ chmod 0644 ${RPM_BUILD_ROOT}%{_fontdir}/%{fontname}/* %post -n %{fontname}-mono-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %post -n %{fontname}-narrow-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %post -n %{fontname}-sans-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %post -n %{fontname}-serif-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %postun -n %{fontname}-mono-fonts if [ $1 -eq 0 -a -x /usr/bin/fc-cache ] ; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %postun -n %{fontname}-narrow-fonts if [ $1 -eq 0 -a -x /usr/bin/fc-cache ] ; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %postun -n %{fontname}-sans-fonts if [ $1 -eq 0 -a -x /usr/bin/fc-cache ] ; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %postun -n %{fontname}-serif-fonts if [ $1 -eq 0 -a -x /usr/bin/fc-cache ] ; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files -n %{fontname}-mono-fonts %defattr(-,root,system,-) %doc AUTHORS COPYING ChangeLog License.txt README TODO %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationMono*.ttf %files -n %{fontname}-narrow-fonts %defattr(-,root,system,-) %doc AUTHORS COPYING ChangeLog License.txt README TODO %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSansNarrow*.ttf %files -n %{fontname}-sans-fonts %defattr(-,root,system,-) %doc AUTHORS COPYING ChangeLog License.txt README TODO %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSans-*.ttf %files -n %{fontname}-serif-fonts %defattr(-,root,system,-) %doc AUTHORS COPYING ChangeLog License.txt README TODO %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSerif*.ttf %changelog * Tue Jan 11 2011 Michael Perzl - 1.06.0.20100721-1 - first version for AIX V5.1 and higher