reseolves 474734 incl fontconfig .conf files rename package for post-1.13

fontpackages macros
This commit is contained in:
cchance 2009-01-19 05:42:39 +00:00
parent 280101e02e
commit 76018e6c42
4 changed files with 98 additions and 49 deletions

19
65-liberation-mono.conf Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
monospace faces
-->
<alias>
<family>Liberation Mono</family>
<default>
<family>monospace</family>
</default>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Liberation Mono</family>
</prefer>
</alias>
</fontconfig>

19
65-liberation-sans.conf Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Sans-serif faces
-->
<alias>
<family>Liberation Sans</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Liberation Sans</family>
</prefer>
</alias>
</fontconfig>

19
65-liberation-serif.conf Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Serif faces
-->
<alias>
<family>Liberation Serif</family>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Liberation Serif</family>
</prefer>
</alias>
</fontconfig>

View File

@ -1,18 +1,16 @@
%define fontname liberation %define fontname liberation
%define fontconf <65>-%{fontname}
%define archivename %{name}-%{version} %define archivename %{name}-%{version}
%define common_desc \ %define common_desc \
The Liberation Fonts are intended to be replacements for the three most \ The Liberation Fonts are intended to be replacements for the three most \
commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier \ commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier \
New. New.
%define fontdir %{_datadir}/fonts/%{fontname}
%define catalogue %{_sysconfdir}/X11/fontpath.d %define catalogue %{_sysconfdir}/X11/fontpath.d
Name: %{fontname}-fonts Name: %{fontname}-fonts
Summary: Fonts to replace commonly used Microsoft Windows fonts Summary: Fonts to replace commonly used Microsoft Windows fonts
Version: 1.04.93 Version: 1.04.93
Release: 3%{?dist} Release: 4%{?dist}
# The license of the Liberation Fonts is a EULA that contains GPLv2 and two # The license of the Liberation Fonts is a EULA that contains GPLv2 and two
# exceptions: # exceptions:
# The first exception is the standard FSF font exception. # The first exception is the standard FSF font exception.
@ -23,12 +21,15 @@ 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
Requires: liberation-fonts-sans >= %{version} Requires: %{name}-sans >= %{version}-%{release}
Requires: liberation-fonts-serif >= %{version} Requires: %{name}-serif >= %{version}-%{release}
Requires: liberation-fonts-mono >= %{version} Requires: %{name}-mono >= %{version}-%{release}
Obsoletes: liberation-fonts-sans < %{version}-%{release}
Obsoletes: liberation-fonts-serif < %{version}-%{release}
Obsoletes: liberation-fonts-mono < %{version}-%{release}
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch BuildArch: noarch
Buildrequires: fontpackages-devel xorg-x11-font-utils Buildrequires: fontpackages-devel >= 1.13, xorg-x11-font-utils
%description %description
%common_desc %common_desc
@ -36,33 +37,43 @@ Buildrequires: fontpackages-devel xorg-x11-font-utils
Meta-package of Liberation fonts which installs Sans, Serif, and Monospace Meta-package of Liberation fonts which installs Sans, Serif, and Monospace
families. families.
%package common %files
%{nil}
%package -n %{fontname}-common-fonts
Summary: Shared common files of Liberation font families. Summary: Shared common files of Liberation font families.
License: Liberation License: Liberation
Group: User Interface/X Group: User Interface/X
Requires: fontpackages-filesystem Requires: fontpackages-filesystem >= 1.13
%description common %description -n %{fontname}-common-fonts
%common_desc %common_desc
Shared common files of Liberation font families. Shared common files of Liberation font families.
%files -n %{fontname}-common-fonts
%defattr(0644,root,root,0755)
%doc AUTHORS ChangeLog COPYING License.txt README
%dir %{_fontdir}
%verify(not md5 size mtime) %{_fontdir}/fonts.dir
%verify(not md5 size mtime) %{_fontdir}/fonts.scale
%{catalogue}/%{name}
%define mk_pkg()\ %define mk_pkg()\
%package %1\ %package -n %{fontname}-%1-fonts\
Summary: %3 fonts to replace commonly used Microsoft %4\ Summary: %3 fonts to replace commonly used Microsoft %4\
License: Liberation\ License: Liberation\
Group: User Interface/X\ Group: User Interface/X\
Requires: fontpackages-filesystem, %{name}-common >= %{version}\ Obsoletes: %{name}-%1 < %{version}-%{release}\
Requires: fontpackages-filesystem >= 1.13\
Requires: %{fontname}-common-fonts = %{version}-%{release}\
\ \
%description %1\ %description -n %{fontname}-%1-fonts\
%common_desc\ %common_desc\
\ \
%3 TrueType fonts that replaced commonly used Microsoft %4.\ This is %3 TrueType fonts that replaced commonly used Microsoft %4.\
\ \
%files %1\ %_font_pkg -n %1 -f *-%{fontname}-%1*.conf Liberation%2-*.ttf
%defattr(0644,root,root,0755)\
%dir %{fontdir}\
%{fontdir}/Liberation%2-*.ttf
%mk_pkg sans Sans Sans Arial %mk_pkg sans Sans Sans Arial
%mk_pkg serif Serif Sans-serif Times_New_Roman %mk_pkg serif Serif Sans-serif Times_New_Roman
@ -79,42 +90,23 @@ rm -rf %{buildroot}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
# fonts # fonts .ttf
install -m 0755 -d %{buildroot}%{fontdir} install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 *.ttf %{buildroot}%{fontdir} install -m 0644 *.ttf %{buildroot}%{_fontdir}
# configuration # fontconfig .conf
install -m 0755 -d %{buildroot}%{_sysconfdir}/fonts/conf.d install -m 0755 -d %{buildroot}%{_sysconfdir}/fonts/conf.d
# catalogue # catalogue
install -d %{buildroot}%{catalogue} install -d %{buildroot}%{catalogue}
ln -sf %{fontdir} %{buildroot}%{catalogue}/%{name} ln -sf %{_fontdir} %{buildroot}%{catalogue}/%{name}
# fonts.{dir,scale}
# generate fonts.dir and fonts.scale mkfontdir %{buildroot}%{_fontdir}
mkfontdir %{buildroot}%{fontdir} mkfontscale %{buildroot}%{_fontdir}
mkfontscale %{buildroot}%{fontdir}
%post
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache %{_datadir}/fonts
fi
%postun
if [ "$1" = "0" ]; then
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache %{_datadir}/fonts
fi
fi
%files
%{nil}
%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 %changelog
* Mon Jan 19 2009 Caius Chance <cchance@redhat.com> - 1.04.93-4.fc11
- Resolves: thbz#477410
- Package renaming for post-1.13 fontpackages macros.
* Fri Jan 09 2009 Caius Chance <cchance@redhat.com> - 1.04.93-3.fc11 * Fri Jan 09 2009 Caius Chance <cchance@redhat.com> - 1.04.93-3.fc11
- Resolves: rhbz#477410 (Convert to new font packaging guidelines.) - Resolves: rhbz#477410 (Convert to new font packaging guidelines.)