rhbz#477410 (convert into new font packaging guidelines)

This commit is contained in:
cchance 2009-01-09 03:14:54 +00:00
parent 2c56c0a149
commit 39f9b2ff93

View File

@ -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 %define catalogue %{_sysconfdir}/X11/fontpath.d
Summary: Fonts to replace commonly used Microsoft Windows Fonts Name: %{fontname}-fonts
Name: liberation-fonts Summary: Fonts to replace commonly used Microsoft Windows fonts
Version: 1.04.93 Version: 1.04.93
Release: 2%{?dist} Release: 3%{?dist}
# The license of the Liberation Fonts is a EULA that contains # The license of the Liberation Fonts is a EULA that contains GPLv2 and two
# GPLv2 and two exceptions: # exceptions:
# The first exception is the standard FSF font exception. # The first exception is the standard FSF font exception.
# The second exception is an anti-lockdown clause somewhat like # The second exception is an anti-lockdown clause somewhat like the one in
# the one in GPLv3. This license is Free, but GPLv2 and GPLv3 # GPLv3. This license is Free, but GPLv2 and GPLv3 incompatible.
# incompatible. License: Liberation
License: Liberation Group: User Interface/X
Group: User Interface/X URL: https://www.redhat.com/promo/fonts/
URL: https://www.redhat.com/promo/fonts/ Source0: liberation-fonts-1.04.93.devel.tar.gz
Source0: liberation-fonts-1.04.93.devel.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch
BuildArch: noarch Buildrequires: fontpackages-devel xorg-x11-font-utils
Buildrequires: xorg-x11-font-utils
%description %description
The Liberation Fonts are intended to be replacements for the three %common_desc
most commonly used fonts on Microsoft systems: Times New Roman,
Arial, and Courier New. %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 %prep
%setup -q -n %{name}-%{version}.devel %setup -q -n %{name}-%{version}.devel
@ -31,6 +68,7 @@ Arial, and Courier New.
rm -rf %{buildroot} rm -rf %{buildroot}
%build %build
%{nil}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
@ -40,8 +78,8 @@ install -m 0644 *.ttf %{buildroot}%{fontdir}
# configuration # configuration
install -m 0755 -d %{buildroot}%{_sysconfdir}/fonts/conf.d install -m 0755 -d %{buildroot}%{_sysconfdir}/fonts/conf.d
# catalogue # catalogue
install -d $RPM_BUILD_ROOT%{catalogue} install -d %{buildroot}%{catalogue}
ln -sf %{fontdir} $RPM_BUILD_ROOT%{catalogue}/%{name} ln -sf %{fontdir} %{buildroot}%{catalogue}/%{name}
# generate fonts.dir and fonts.scale # generate fonts.dir and fonts.scale
mkfontdir %{buildroot}%{fontdir} mkfontdir %{buildroot}%{fontdir}
@ -59,16 +97,17 @@ if [ "$1" = "0" ]; then
fi fi
fi fi
%files %files common
%defattr(-,root,root) %defattr(0644,root,root,0755)
%doc License.txt COPYING %doc AUTHORS ChangeLog COPYING License.txt README
%dir %{fontdir}
%{fontdir}/*.ttf
%verify(not md5 size mtime) %{fontdir}/fonts.dir %verify(not md5 size mtime) %{fontdir}/fonts.dir
%verify(not md5 size mtime) %{fontdir}/fonts.scale %verify(not md5 size mtime) %{fontdir}/fonts.scale
%{catalogue}/%{name} %{catalogue}/%{name}
%changelog %changelog
* Fri Jan 09 2009 Caius Chance <cchance@redhat.com> - 1.04.93-3.fc11
- Resolves: rhbz#477410 (Convert to new font packaging guidelines.)
* Tue Dec 09 2008 Caius Chance <cchance@redhat.com> - 1.04.93-2.fc11 * Tue Dec 09 2008 Caius Chance <cchance@redhat.com> - 1.04.93-2.fc11
- Resolves: rhbz#474522 (Cent sign is not coressed in Sans & Mono.) - Resolves: rhbz#474522 (Cent sign is not coressed in Sans & Mono.)