21ca4ed
%define fontname        dejavu
f6909aa
%define fontdir         %{_datadir}/fonts/%{fontname}/
f6909aa
%define fontconfdir     %{_sysconfdir}/fonts/conf.d/
21ca4ed
c051be2
%define archivename     %{fontname}-sfd-%{archiveversion}
763f466
ed142bd
#define alphatag        .20070616svn1889
baef565
#define alphatag        .rc1
21ca4ed
baef565
#define archiveversion  20070627-1922
baef565
%define archiveversion  %{version}
8b37326
78ae1fd
21ca4ed
# Let the perl maintainer worry about Unicode.org data files
763f466
%define Blocks          %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/Blocks.txt
763f466
%define UnicodeData     %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/UnicodeData.txt
009e7a9
21ca4ed
Name:      %{fontname}-fonts
f6909aa
Version:   2.19
baef565
Release:   1%{?alphatag}%{?dist}
7dfce44
Summary:   DejaVu fonts
c051be2
78ae1fd
Group:     User Interface/X
baef565
License:   Modifiable & redistributable, with naming restrictions
21ca4ed
URL:       http://%{fontname}.sf.net/
c051be2
Source0:   http://%{fontname}.sourceforge.net/%{?alphatag:snapshots/}%{archivename}.tar.bz2
1f7ed57
# DejaVu fontconfig setup
c2a8ce7
Source1:   %{name}-fontconfig.conf
e6a6351
Source2:   %{name}-fontconfig-unhint-small.conf
763f466
# DejaVu fontconfig setup (experimental families)
e6a6351
Source3:   %{name}-experimental-fontconfig.conf
e6a6351
Source4:   %{name}-experimental-fontconfig-unhint-small.conf
c051be2
78ae1fd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
baef565
# Older fontforge versions will not work due to sfd format changes
b169174
BuildRequires: fontforge > 20070501
493bee9
BuildRequires: perl(Font::TTF)
009e7a9
# Needed to compute unicode coverage
009e7a9
BuildRequires: %{Blocks} %{UnicodeData}
78ae1fd
BuildArch: noarch
bcd73bd
78ae1fd
%description
4331ae8
The DejaVu fonts are a font family based on the "Bitstream Vera" fonts release
8dd21c7
1.10. Its purpose is to provide a wider range of characters while maintaining
8dd21c7
the original look and feel through the process of collaborative development.
d349ab0
d349ab0
This package includes the typefaces the DejaVu project considers mature.
78ae1fd
a286b14
7dfce44
%package experimental
7dfce44
Group:    User Interface/X
7dfce44
Summary:  Experimental DejaVu typefaces
7dfce44
# Does not really make sense without the core typefaces
7dfce44
Requires: %{name} = %{version}-%{release}
7dfce44
7dfce44
7dfce44
%description experimental
4331ae8
The DejaVu fonts are a font family based on the "Bitstream Vera" fonts release
8dd21c7
1.10.
8dd21c7
8dd21c7
This package includes the typefaces the DejaVu project considers experimental.
7dfce44
7dfce44
78ae1fd
%prep
c051be2
%setup -q -n %{archivename}
a286b14
21ca4ed
78ae1fd
%build
009e7a9
./generate.sh
009e7a9
./status.pl %{version} status.txt *.sfd > status.txt.new
009e7a9
mv status.txt.new status.txt
009e7a9
./unicover.pl %{UnicodeData} %{Blocks} \
009e7a9
              DejaVuSans.sfd Sans \
009e7a9
              DejaVuSerif.sfd Serif \
009e7a9
              DejaVuMonoSans.sfd "Sans Mono" > unicover.txt
7dfce44
# We should probably also regenerate langcover.txt
7dfce44
# but it requires resolution of 
7dfce44
# https://bugs.freedesktop.org/show_bug.cgi?id=6316 
009e7a9
21ca4ed
# Remove mes files or they end in %doc
21ca4ed
rm mes*.txt
a286b14
009e7a9
%check
009e7a9
# Current upstream files are full of "problems"
009e7a9
# Do not panic if the output is long
6945c71
./problems.pl *.sfd
78ae1fd
a286b14
78ae1fd
%install
c051be2
rm -fr %{buildroot}
78ae1fd
c051be2
# Fonts
c051be2
install -m 0755 -d %{buildroot}%{fontdir}
c051be2
install -m 0644 -p generated/*.ttf  %{buildroot}%{fontdir}
78ae1fd
21ca4ed
# Fontconfig tweaks
f6909aa
install -m 0755 -d %{buildroot}%{fontconfdir}
f6909aa
install -m 0644 -p %{SOURCE1} %{buildroot}%{fontconfdir}57-%{fontname}.conf
f6909aa
install -m 0644 -p %{SOURCE2} %{buildroot}%{fontconfdir}20-unhint-small-%{fontname}.conf
f6909aa
install -m 0644 -p %{SOURCE3} %{buildroot}%{fontconfdir}61-%{fontname}-experimental.conf
f6909aa
install -m 0644 -p %{SOURCE4} %{buildroot}%{fontconfdir}20-unhint-small-%{fontname}-experimental.conf
21ca4ed
a286b14
78ae1fd
%clean
c051be2
rm -fr %{buildroot}
78ae1fd
78ae1fd
78ae1fd
%post
f6909aa
if [ -x %{_bindir}/fc-cache ]; then
f6909aa
  %{_bindir}/fc-cache %{fontdir}
78ae1fd
fi
78ae1fd
a286b14
78ae1fd
%postun
78ae1fd
if [ "$1" = "0" ]; then
f6909aa
  if [ -x %{_bindir}/fc-cache ]; then
f6909aa
    %{_bindir}/fc-cache %{fontdir}
78ae1fd
  fi
78ae1fd
fi
78ae1fd
78ae1fd
7dfce44
%post experimental
f6909aa
if [ -x %{_bindir}/fc-cache ]; then
f6909aa
  %{_bindir}/fc-cache %{fontdir}
7dfce44
fi
7dfce44
7dfce44
7dfce44
%postun experimental
7dfce44
if [ "$1" = "0" ]; then
f6909aa
  if [ -x %{_bindir}/fc-cache ]; then
f6909aa
    %{_bindir}/fc-cache %{fontdir}
7dfce44
  fi
7dfce44
fi
7dfce44
c2efd84
78ae1fd
%files
78ae1fd
%defattr(0644,root,root,0755)
78ae1fd
%doc *.txt AUTHORS BUGS LICENSE NEWS README
78ae1fd
f6909aa
%config(noreplace) %{fontconfdir}20-unhint-small-%{fontname}.conf
f6909aa
%config(noreplace) %{fontconfdir}57-%{fontname}.conf
7be0f7b
78ae1fd
%dir %{fontdir}
c051be2
%{fontdir}/*.ttf
7dfce44
%exclude %{fontdir}/DejaVu*Condensed*.ttf
7dfce44
%exclude %{fontdir}/DejaVu*ExtraLight*.ttf
ed142bd
%exclude %{fontdir}/DejaVuSerif-*Italic.ttf
7dfce44
6867c2e
7dfce44
%files experimental
7dfce44
%defattr(0644,root,root,0755)
763f466
f6909aa
%config(noreplace) %{fontconfdir}20-unhint-small-%{fontname}-experimental.conf
f6909aa
%config(noreplace) %{fontconfdir}61-%{fontname}-experimental.conf
763f466
7dfce44
%{fontdir}/DejaVu*Condensed*.ttf
7dfce44
%{fontdir}/DejaVu*ExtraLight*.ttf
ed142bd
%{fontdir}/DejaVuSerif-*Italic.ttf
78ae1fd
caf1164
78ae1fd
%changelog
f6909aa
* Sat Aug 11 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
f6909aa
☺ 2.19-1
f6909aa
✓ 2.19 final
f6909aa
✓ expand macro use
f6909aa
baef565
* Sun Jul 1 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
baef565
☺ 2.18-1
baef565
✓ 2.18 final
baef565
✓ Major new release adding Tifinagh (ⵞⵥⴼⴻ), N'ko (ߝߧߜ) and Georgian (ლფჱႫႿ)
baef565
  (Georgian created by Besarion Paata Gugushvili ბესარიონ პაატა გუგუშვილი)
baef565
ed142bd
* Wed Jun 27 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
ed142bd
☺ 2.18-0.2.rc1
ed142bd
✓ 2.18-rc1
ed142bd
77fbdb6
* Sun Jun 3 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
b169174
☢ 2.18-0.1.20070616svn1889
b169174
⚠ early snapshot to test new fontforge
b169174
b169174
* Sun Jun 3 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
fe0a128
☺ 2.17-5
fe0a128
✓ declare DejaVu a valid Bitstream Prima™ substitute
77fbdb6
c051be2
* Thu May 31 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
c051be2
☺ 2.17-3
c051be2
✓ small spec cleanups
c051be2
493bee9
* Sat May 26 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
493bee9
☺ 2.17-2
493bee9
✓ perl-Font-TTF has been fixed upstream, use perl(Font::TTF) BR
77fbdb6
✓ remove comment about /etc/fonts/conf.d ownership, as it's now owned
493bee9
   by filesystem
493bee9
21ca4ed
* Sun May 13 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
21ca4ed
☺ 2.17-1
21ca4ed
✓ rebase scriptlets from guidelines
21ca4ed
✓ fontforge broke compat: BR the current version, ask for a version bump
21ca4ed
  before 2.18 is released
21ca4ed
✓ simplify font directory naming
21ca4ed
✓ clean up fc5 obsoletes
21ca4ed
✓ remove technical mes files from doc
21ca4ed
49faee9
* Fri May 11 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
e6a6351
☺ 2.17-0.3.rc1
e6a6351
✓ fontconfig setup has stabilized and can be marked noreplace now
e6a6351
☺ 2.17-0.2.rc1
e6a6351
✓ mimick Vera unhint conf split
e6a6351
☺ 2.17-0.1.rc1
e6a6351
✓ 2.17 rc1
e6a6351
✓ make room for liberations font conf file
49faee9
eadd27b
* Mon Apr 2 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
e6a6351
☺ 2.16-1
eadd27b
7c775dc
* Tue Mar 20 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
e6a6351
☺ 2.16-0.1.20070319svn1699
e6a6351
✓ early snapshot to account for F7T3 freeze
7c775dc
8b37326
* Tue Jan 30 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
e6a6351
☺ 2.14-2
e6a6351
✓ Adds Dejavu Sans Oblique small fixes (by Ben Laenen to address Debian
8b37326
  bug #408311, collected by Davide Viti)
8b37326
4331ae8
* Sun Jan 21 2007 Nicolas Mailhot <nicolas.mailhot at laposte.net>
e6a6351
✓ 2.14 final