%define fontname liberation %global fontconf 30-0-%{fontname} %define _fontdir %{_datadir}/fonts %define _fontconfig_confdir %{_sysconfdir}/fonts/conf.d %define _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail # the narrow fonts are still at 1.07.2 because of licensing problems %define with_narrow 0 Name: %{fontname}-fonts Summary: Fonts to replace commonly used Microsoft Windows fonts Version: 2.00.3 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 Source2: %{fontconf}-mono.conf Source3: %{fontconf}-sans.conf Source4: %{fontconf}-serif.conf 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. %if %{with_narrow} %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. %endif %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}/* mkdir -p ${RPM_BUILD_ROOT}%{_fontconfig_confdir} mkdir -p ${RPM_BUILD_ROOT}%{_fontconfig_templatedir} cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_fontconfig_templatedir}/%{fontconf}-mono.conf cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_fontconfig_templatedir}/%{fontconf}-sans.conf cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_fontconfig_templatedir}/%{fontconf}-serif.conf chmod 0644 ${RPM_BUILD_ROOT}%{_fontconfig_templatedir}/*.conf for f in %{fontconf}-mono.conf %{fontconf}-sans.conf %{fontconf}-serif.conf ; do ln -s %{_fontconfig_templatedir}/$f ${RPM_BUILD_ROOT}%{_fontconfig_confdir}/$f done %post -n %{fontname}-mono-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %if %{with_narrow} %post -n %{fontname}-narrow-fonts if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %endif %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 %if %{with_narrow} %postun -n %{fontname}-narrow-fonts if [ $1 -eq 0 -a -x /usr/bin/fc-cache ] ; then /usr/bin/fc-cache %{_fontdir}/%{fontname} || : fi %endif %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 ChangeLog LICENSE README TODO %{_fontconfig_confdir}/%{fontconf}-mono.conf %{_fontconfig_templatedir}/%{fontconf}-mono.conf %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationMono*.ttf %if %{with_narrow} %files -n %{fontname}-narrow-fonts %defattr(-,root,system,-) %doc AUTHORS ChangeLog LICENSE README TODO %{_fontconfig_confdir}/%{fontconf}-narrow.conf %{_fontconfig_templatedir}/%{fontconf}-narrow.conf %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSansNarrow*.ttf %endif %files -n %{fontname}-sans-fonts %defattr(-,root,system,-) %doc AUTHORS ChangeLog LICENSE README TODO %{_fontconfig_confdir}/%{fontconf}-sans.conf %{_fontconfig_templatedir}/%{fontconf}-sans.conf %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSans-*.ttf %files -n %{fontname}-serif-fonts %defattr(-,root,system,-) %doc AUTHORS ChangeLog LICENSE README TODO %{_fontconfig_confdir}/%{fontconf}-serif.conf %{_fontconfig_templatedir}/%{fontconf}-serif.conf %dir %{_fontdir}/%{fontname} %{_fontdir}/%{fontname}/LiberationSerif*.ttf %changelog * Fri Oct 12 2018 Michael Perzl - 2.00.3-1 - updated to version 2.00.3 * Mon Nov 12 2012 Michael Perzl - 2.00.1-1 - updated to version 2.00.1 * Fri Apr 20 2012 Michael Perzl - 1.07.2-1 - updated to version 1.07.2 * Tue Jul 19 2011 Michael Perzl - 1.07.0-1 - updated to version 1.07.0 * Tue Jan 11 2011 Michael Perzl - 1.06.0.20100721-1 - first version for AIX V5.1 and higher