diff --git a/liberation-fonts.spec b/liberation-fonts.spec index 5c0657f..245e0ed 100644 --- a/liberation-fonts.spec +++ b/liberation-fonts.spec @@ -1,28 +1,65 @@ -%define fontdir %{_datadir}/fonts/liberation +%define fontname liberation +%define fontconf <65>-%{fontname} +%define archivename %{name}-%{version} +%define common_desc \ +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. + +%define fontdir %{_datadir}/fonts/%{fontname} %define catalogue %{_sysconfdir}/X11/fontpath.d -Summary: Fonts to replace commonly used Microsoft Windows Fonts -Name: liberation-fonts -Version: 1.04.93 -Release: 2%{?dist} -# The license of the Liberation Fonts is a EULA that contains -# GPLv2 and two exceptions: +Name: %{fontname}-fonts +Summary: Fonts to replace commonly used Microsoft Windows fonts +Version: 1.04.93 +Release: 3%{?dist} +# 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: https://www.redhat.com/promo/fonts/ -Source0: liberation-fonts-1.04.93.devel.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildArch: noarch -Buildrequires: xorg-x11-font-utils +# 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: https://www.redhat.com/promo/fonts/ +Source0: liberation-fonts-1.04.93.devel.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildArch: noarch +Buildrequires: fontpackages-devel xorg-x11-font-utils %description -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. +%common_desc + +%package common +Summary: Shared common files of Liberation font families. +License: Liberation +Group: User Interface/X +Requires: fontpackages-filesystem + +%description common +%common_desc + +Shared common files of Liberation font families. + +%define mk_pkg()\ +%package %1\ +Summary: %3 fonts to replace commonly used Microsoft %4\ +License: Liberation\ +Group: User Interface/X\ +Requires: fontpackages-filesystem, %{name}-common\ +\ +%description %1\ +%common_desc\ +\ +%3 TrueType fonts that replaced commonly used Microsoft %4.\ +\ +%files %1\ +%defattr(0644,root,root,0755)\ +%dir %{fontdir}\ +%{fontdir}/Liberation%2-*.ttf + +%mk_pkg sans Sans Sans Arial +%mk_pkg serif Serif Sans-serif Times_New_Roman +%mk_pkg mono Mono Monospace Courier_New %prep %setup -q -n %{name}-%{version}.devel @@ -31,6 +68,7 @@ Arial, and Courier New. rm -rf %{buildroot} %build +%{nil} %install rm -rf %{buildroot} @@ -40,8 +78,8 @@ install -m 0644 *.ttf %{buildroot}%{fontdir} # configuration install -m 0755 -d %{buildroot}%{_sysconfdir}/fonts/conf.d # catalogue -install -d $RPM_BUILD_ROOT%{catalogue} -ln -sf %{fontdir} $RPM_BUILD_ROOT%{catalogue}/%{name} +install -d %{buildroot}%{catalogue} +ln -sf %{fontdir} %{buildroot}%{catalogue}/%{name} # generate fonts.dir and fonts.scale mkfontdir %{buildroot}%{fontdir} @@ -59,16 +97,17 @@ if [ "$1" = "0" ]; then fi fi -%files -%defattr(-,root,root) -%doc License.txt COPYING -%dir %{fontdir} -%{fontdir}/*.ttf +%files common +%defattr(0644,root,root,0755) +%doc AUTHORS ChangeLog COPYING License.txt README %verify(not md5 size mtime) %{fontdir}/fonts.dir %verify(not md5 size mtime) %{fontdir}/fonts.scale %{catalogue}/%{name} %changelog +* Fri Jan 09 2009 Caius Chance - 1.04.93-3.fc11 +- Resolves: rhbz#477410 (Convert to new font packaging guidelines.) + * Tue Dec 09 2008 Caius Chance - 1.04.93-2.fc11 - Resolves: rhbz#474522 (Cent sign is not coressed in Sans & Mono.)