major package rework with new subpackage split

This commit is contained in:
nim 2008-11-08 18:38:15 +00:00
parent 3fb5bf5b53
commit 8d167c026e
3 changed files with 1454 additions and 104 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
%define fontname dejavu %define fontname dejavu
%define fontdir %{_datadir}/fonts/%{fontname} %define fontdir %{_datadir}/fonts/%{fontname}/
%define fontconfdir %{_sysconfdir}/fonts/conf.d %define fontconfdir %{_sysconfdir}/fonts/conf.d/
%define archivename %{name}-%{archiveversion} %define archivename %{name}-%{archiveversion}
@ -14,15 +14,53 @@
%define Blocks %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/Blocks.txt %define Blocks %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/Blocks.txt
%define UnicodeData %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/UnicodeData.txt %define UnicodeData %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/UnicodeData.txt
# Common description
%define common_desc \
The DejaVu font set is based on the “Bitstream Vera” fonts, release 1.10. Its\
purpose is to provide a wider range of characters, while maintaining the \
original style, using an open collaborative development process.
# Compat description
%define compat_desc \
This package only exists to help transition pre 2.26-3 DejaVu users to the new\
package split. It will be removed after one distribution release cycle, please\
do not reference it or depend on it in any way.\
\
It can be safely uninstalled.
# Subpackage magic - should be generic enough for reuse in other packages
%define font_subpkg(n:f:) \
\
%post %{-n*} \
if [ -x %{_bindir}/fc-cache ]; then \
%{_bindir}/fc-cache %{fontdir} || : \
fi \
\
\
%postun %{-n*} \
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then \
%{_bindir}/fc-cache %{fontdir} || : \
fi\
\
\
%files %{-n*} \
%defattr(0644,root,root,0755) \
\
%{-f:%config(noreplace) %{fontconfdir}%{-f*}} \
\
%(echo %* | sed "s+ +\\n+g"| sed "s+^+%{fontdir}+g")
Name: %{fontname}-fonts Name: %{fontname}-fonts
Version: 2.26 Version: 2.26
Release: 2%{?alphatag}%{?dist} Release: 3%{?alphatag}%{?dist}
Summary: DejaVu fonts, mature typefaces Summary: DejaVu fonts
Group: User Interface/X Group: User Interface/X
License: Bitstream Vera and Public Domain License: Bitstream Vera and Public Domain
URL: http://%{fontname}.sf.net/ URL: http://%{fontname}.sf.net/
Source0: %{?!alphatag:http://downloads.sourceforge.net/%{fontname}}%{?alphatag:%{fontname}.sourceforge.net/snapshots}/%{archivename}.tar.bz2 Source0: %{?!alphatag:http://downloads.sourceforge.net/%{fontname}}%{?alphatag:%{fontname}.sourceforge.net/snapshots}/%{archivename}.tar.bz2
Patch0: %{name}-2.26-fontconfig.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# Older fontforge versions will not work due to sfd format changes # Older fontforge versions will not work due to sfd format changes
@ -33,53 +71,141 @@ BuildRequires: %{Blocks} %{UnicodeData}
BuildArch: noarch BuildArch: noarch
%description %description
The DejaVu fonts are a font family based on the “Bitstream Vera” fonts release %common_desc
1.10. Its purpose is to provide a wider range of characters while maintaining
the original look and feel through the process of collaborative development.
This package includes the typefaces the DejaVu project considers mature.
%package experimental %package doc
Summary: DejaVu fonts, documentation
Group: User Interface/X Group: User Interface/X
Summary: DejaVu fonts, experimental typefaces
# Does not really make sense without the core typefaces %description doc
Requires: %{name} = %{version}-%{release} %common_desc
This package consists of the DejaVu project documentation.
%description experimental %package compat
The DejaVu fonts are a font family based on the "Bitstream Vera" fonts release Summary: DejaVu fonts, compatibility
1.10. Its purpose is to provide a wider range of characters while maintaining
the original look and feel through the process of collaborative development.
This package includes the typefaces the DejaVu project considers experimental.
%package -n %{fontname}-lgc-fonts
Group: User Interface/X Group: User Interface/X
Summary: DejaVu fonts, Latin Greek Cyrillic subset
# Could possibly conflict with the main package, as there's really no sense to Obsoletes: dejavu-fonts < 2.6.23
# install both Obsoletes: dejavu-fonts-experimental < 2.6.23
#Conflicts: %{name} <= %{version}-%{release}
Requires: %{name}-sans, %{name}-serif, %{name}-sans-mono
%description compat
%compat_desc
%description -n %{fontname}-lgc-fonts %package lgc-compat
The DejaVu fonts are a font family based on the "Bitstream Vera" fonts release Summary: DejaVu fonts, LGC compatibility
1.10. Its purpose is to provide a wider range of characters while maintaining Group: User Interface/X
the original look and feel through the process of collaborative development.
This package includes a subset of DejaVu typefaces limited to Latin, Greek and Obsoletes: dejavu-lgc-fonts < 2.6.23
Cyrillic glyphs.
Requires: %{name}-lgc-sans, %{name}-lgc-serif, %{name}-lgc-sans-mono
%description lgc-compat
%compat_desc
%package sans
Summary: DejaVu, variable-width sans-serif font faces
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description sans
%common_desc
This package consists of the DejaVu sans-serif variable-width font faces, in
their unabridged version.
%font_subpkg -n sans -f *-%{fontname}-sans.conf DejaVuSans.ttf DejaVuSans-*.ttf DejaVuSansCondensed*.ttf
%package serif
Summary: DejaVu, variable-width serif font faces
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description serif
%common_desc
This package consists of the DejaVu serif variable-width font faces, in their
unabridged version.
%font_subpkg -n serif -f *-%{fontname}-serif.conf DejaVuSerif.ttf DejaVuSerif-*.ttf DejaVuSerifCondensed*.ttf
%package sans-mono
Summary: DejaVu, monospace sans-serif font faces
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description sans-mono
%common_desc
This package consists of the DejaVu sans-serif monospace font faces, in their
unabridged version.
%font_subpkg -n sans-mono -f *-%{fontname}-sans-mono.conf DejaVuSansMono*.ttf
%package lgc-sans
Summary: DejaVu, variable-width sans-serif font faces, Latin-Greek-Cyrillic subset
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description lgc-sans
%common_desc
This package consists of the DejaVu sans-serif variable-width font faces, with
unicode coverage restricted to Latin, Greek and Cyrillic.
%font_subpkg -n lgc-sans -f *-%{fontname}-lgc-sans.conf DejaVuLGCSans.ttf DejaVuLGCSans-*.ttf DejaVuLGCSansCondensed*.ttf
%package lgc-serif
Summary: DejaVu, variable-width serif font faces, Latin-Greek-Cyrillic subset
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description lgc-serif
%common_desc
This package consists of the DejaVu serif variable-width font faces, with
unicode coverage restricted to Latin, Greek and Cyrillic.
%font_subpkg -n lgc-serif -f *-%{fontname}-lgc-serif.conf DejaVuLGCSerif.ttf DejaVuLGCSerif-*.ttf DejaVuLGCSerifCondensed*.ttf
%package lgc-sans-mono
Summary: DejaVu, monospace sans-serif font faces, Latin-Greek-Cyrillic subset
Group: User Interface/X
Requires: %{name}-doc = %{version}-%{release}
%description lgc-sans-mono
%common_desc
This package consists of the DejaVu sans-serif monospace font faces, with
unicode coverage restricted to Latin, Greek and Cyrillic.
%font_subpkg -n lgc-sans-mono -f *-%{fontname}-lgc-sans-mono.conf DejaVuLGCSansMono*.ttf
%prep %prep
%setup -q -n %{archivename} %setup -q -n %{archivename}
%patch0 -p1
%build %build
make %{?_smp_mflags} VERSION=%{version} FC-LANG="" \ make %{?_smp_mflags} VERSION=%{version} FC-LANG="" \
BLOCKS=%{Blocks} UNICODEDATA=%{UnicodeData} BLOCKS=%{Blocks} UNICODEDATA=%{UnicodeData}
# Stop the spin people from complaining this file is too big
bzip2 -9 build/status.txt
%check %check
make check make check
@ -97,85 +223,23 @@ install -m 0644 -p fontconfig/*conf %{buildroot}%{fontconfdir}
%clean %clean
rm -fr %{buildroot} rm -fr %{buildroot}
%files doc
%post
if [ -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%postun
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%post experimental
if [ -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%postun experimental
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%post -n %{fontname}-lgc-fonts
if [ -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%postun -n %{fontname}-lgc-fonts
if [ -x %{_bindir}/fc-cache ] ; then
%{_bindir}/fc-cache %{fontdir} || :
fi
%files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc AUTHORS BUGS LICENSE NEWS README %doc AUTHORS BUGS LICENSE NEWS README
%doc build/unicover.txt build/langcover.txt build/status.txt %doc build/unicover.txt build/status.txt.bz2
%config(noreplace) %{fontconfdir}/20-unhint-small-%{fontname}.conf
%config(noreplace) %{fontconfdir}/57-%{fontname}.conf
# May as well put it in the common doc package
%dir %{fontdir}/ %dir %{fontdir}/
%{fontdir}/*.ttf
%exclude %{fontdir}/DejaVu*Condensed*.ttf
%exclude %{fontdir}/DejaVu*ExtraLight*.ttf
%exclude %{fontdir}/DejaVuSerif*Italic.ttf
%exclude %{fontdir}/DejaVuLGC*.ttf
%files experimental
%defattr(0644,root,root,0755)
%config(noreplace) %{fontconfdir}/20-unhint-small-%{fontname}-experimental.conf
%config(noreplace) %{fontconfdir}/61-%{fontname}-experimental.conf
%{fontdir}/DejaVu*Condensed*.ttf
%{fontdir}/DejaVu*ExtraLight*.ttf
%{fontdir}/DejaVuSerif*Italic.ttf
%exclude %{fontdir}/DejaVuLGC*.ttf
%files -n %{fontname}-lgc-fonts
%defattr(0644,root,root,0755)
%doc AUTHORS BUGS LICENSE NEWS README
%doc build/unicover-lgc.txt build/langcover-lgc.txt
%config(noreplace) %{fontconfdir}/20-unhint-small-%{fontname}-lgc.conf
%config(noreplace) %{fontconfdir}/58-%{fontname}-lgc.conf
%dir %{fontdir}/
%{fontdir}/DejaVuLGC*.ttf
%changelog %changelog
* Sat Nov 8 2008 Nicolas Mailhot <nicolas.mailhot at laposte.net>
- 2.26-3
Package split reorganisation, following font family lines
Create compat packages to ease switchover at F11 time (to be discontinued
for F12)
compress status file
* Wed Sep 3 2008 Nicolas Mailhot <nicolas.mailhot at laposte.net> * Wed Sep 3 2008 Nicolas Mailhot <nicolas.mailhot at laposte.net>
- 2.26-2 - 2.26-2
Rebuild with pre-F10-freeze fontforge Rebuild with pre-F10-freeze fontforge

View File

@ -1,3 +1,4 @@
dejavu-fonts-2_25-2_fc10:HEAD:dejavu-fonts-2.25-2.fc10.src.rpm:1215806350 dejavu-fonts-2_25-2_fc10:HEAD:dejavu-fonts-2.25-2.fc10.src.rpm:1215806350
dejavu-fonts-2_26-1_fc10:HEAD:dejavu-fonts-2.26-1.fc10.src.rpm:1217165726 dejavu-fonts-2_26-1_fc10:HEAD:dejavu-fonts-2.26-1.fc10.src.rpm:1217165726
dejavu-fonts-2_26-2_fc10:HEAD:dejavu-fonts-2.26-2.fc10.src.rpm:1220476598 dejavu-fonts-2_26-2_fc10:HEAD:dejavu-fonts-2.26-2.fc10.src.rpm:1220476598
dejavu-fonts-2_26-3_fc11:HEAD:dejavu-fonts-2.26-3.fc11.src.rpm:1226169315