diff --git a/dejavu-fonts-block.xsl b/dejavu-fonts-block.xsl
new file mode 100644
index 0000000..4d1de3e
--- /dev/null
+++ b/dejavu-fonts-block.xsl
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Added by dejavu-fonts-block
+ Use KacstQura as default sans-serif when lang is Arabic
+ sans-serif
+ ar
+
+ KacstQura
+
+
+
+ Added by dejavu-fonts-block
+ Use KacstQura as default serif when lang is Arabic
+ serif
+ ar
+
+ KacstQura
+
+
+
+ Added by dejavu-fonts-block
+ Use KacstQura as default monospace when lang is Arabic
+ monospace
+ ar
+
+ KacstQuraFixed
+
+
+
+ Added by dejavu-fonts-block
+ Use Roya as default sans-serif when lang is Farsi
+ sans-serif
+ fa
+
+ Roya
+
+
+
+ Added by dejavu-fonts-block
+ Use Nazli as default serif when lang is Farsi
+ serif
+ fa
+
+ Nazli
+
+
+
+ Added by dejavu-fonts-block
+ Use Terafik as default monospace when lang is Farsi
+ monospace
+ fa
+
+ Terafik
+
+
+
+
+
diff --git a/dejavu-fonts-unblock.xsl b/dejavu-fonts-unblock.xsl
new file mode 100644
index 0000000..c19bf37
--- /dev/null
+++ b/dejavu-fonts-unblock.xsl
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dejavu-fonts.spec b/dejavu-fonts.spec
index ea9401d..f155afb 100644
--- a/dejavu-fonts.spec
+++ b/dejavu-fonts.spec
@@ -11,22 +11,26 @@
Name: dejavu-fonts
Version: 2.7.0
-Release: 0.8%{?dist}
+Release: 0.9%{?dist}
Summary: DejaVu fonts
Group: User Interface/X
License: Redistributable, with restrictions
URL: http://dejavu.sf.net/
Source: http://prdownloads.sourceforge.net/dejavu/%{archivename}-%{archiveversion}.tar.gz
Source1: %{name}-register.xsl
-Source2: %{name}-vera-aliases.conf
-Source3: %{name}-persian-override.conf
-Source4: %{name}-arabic-override.conf
+Source2: %{name}-block.xsl
+Source3: %{name}-unblock.xsl
+Source4: %{name}-vera-aliases.conf
+Source5: %{name}-persian-override.conf
+Source6: %{name}-arabic-override.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: fontforge
# The CPAN sources do not declare perl(Font::TTF)
BuildRequires: perl-Font-TTF
# Needed to compute unicode coverage
BuildRequires: %{Blocks} %{UnicodeData}
+# If we add this the package will require fontconfig
+# Requires: %{fontconfdir}/conf.d
BuildArch: noarch
Conflicts: fontconfig < 2.3.93
@@ -55,8 +59,7 @@ experimental.
%package makedefault
Group: User Interface/X
-Summary: Files needed to register DejaVu fonts in fontconfig aliases
-Requires: %{name} = %{version}-%{release}
+Summary: Files needed to make DejaVu the default fontconfig fonts
# Needed for fontconfig alias registration
Requires: %{_bindir}/xsltproc, /bin/mktemp, %{fontconfdir}/fonts.conf
Obsoletes: %{name}-fontconfig
@@ -73,7 +76,7 @@ the aliases, and keep their current rank otherwise.
Group: User Interface/X
Summary: Files needed to block DejaVu use with some scripts
Requires: %{fontconfdir}/conf.d
-
+Requires: %{_bindir}/xsltproc, /bin/mktemp, %{fontconfdir}/fonts.conf
%description block
The DejaVu fonts are a font family based on the Bitstream Vera Fonts release
@@ -123,12 +126,14 @@ install -m 0644 generated/*.ttf %{buildroot}%{fontdir}
#xsl
install -d -m 755 %{buildroot}%{xsldir}
install -p -m 644 %{SOURCE1} %{buildroot}%{xsldir}/register.xsl
+install -p -m 644 %{SOURCE2} %{buildroot}%{xsldir}/block.xsl
+install -p -m 644 %{SOURCE3} %{buildroot}%{xsldir}/unblock.xsl
# Fontconfig overrides for some scripts
install -d -m 0755 %{buildroot}%{fontconfdir}/conf.d
-install -m 0644 %{SOURCE2} %{buildroot}%{fontconfdir}/conf.d/20-BitstreamVera-aliases.conf
-install -m 0644 %{SOURCE3} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-persian-override.conf
-install -m 0644 %{SOURCE4} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-arabic-override.conf
+install -m 0644 %{SOURCE4} %{buildroot}%{fontconfdir}/conf.d/20-BitstreamVera-aliases.conf
+install -m 0644 %{SOURCE5} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-persian-override.conf
+install -m 0644 %{SOURCE6} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-arabic-override.conf
%clean
@@ -162,6 +167,7 @@ if [ "$1" = "0" ]; then
fi
fi
+
### Triggers yes I know I'm mad
# I hope this won't be necessary by FC6T1 time
@@ -173,6 +179,24 @@ if [ -w %{fontconfdir}/fonts.conf ] ; then
/bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
fi
+# These bits do not seem achieveable right now by dumping files in
+# %{fontconfdir}/conf.d
+%triggerin block -- fontconfig, %{fontconfdir}/fonts.conf
+if [ -w %{fontconfdir}/fonts.conf ] ; then
+ TMPFILE=$(/bin/mktemp -q /tmp/fonts.conf.XXXXXX) && \
+ %{_bindir}/xsltproc --novalid --output $TMPFILE \
+ %{xsldir}/block.xsl %{fontconfdir}/fonts.conf && \
+ /bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
+fi
+
+%triggerun block -- fontconfig, %{fontconfdir}/fonts.conf
+if [ -w %{fontconfdir}/fonts.conf ] ; then
+ TMPFILE=$(/bin/mktemp -q /tmp/fonts.conf.XXXXXX) && \
+ %{_bindir}/xsltproc --novalid --output $TMPFILE \
+ %{xsldir}/unblock.xsl %{fontconfdir}/fonts.conf && \
+ /bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
+fi
+
%files
%defattr(0644,root,root,0755)
@@ -201,18 +225,31 @@ fi
%files block
%defattr(0644,root,root,0755)
+
+%dir %{xsldir}
+%{xsldir}/block.xsl
+%{xsldir}/unblock.xsl
+
%exclude %{fontconfdir}/conf.d/20-BitstreamVera-aliases.conf
%{fontconfdir}/conf.d/*.conf
%changelog
+* Sun Jun 11 2006 Nicolas Mailhot - 2.7.0-0.9
+- reintroduce xslt triggers in dejavu-fonts-block as fontconfig conf.d priority
+ is not high enough for our needs
+
* Sun Jun 11 2006 Nicolas Mailhot - 2.7.0-0.8
-- preparation to 2.7.0 based on the current dejavu snapshot
+- complete and clean up the Vera aliasing
+
+* Sun Jun 11 2006 Nicolas Mailhot - 2.7.0-0.7
- addition of fontconfig blocking for Arabic and Persian
(experimental but safe)
- tweak of the fontconfig aliasing to make DejaVu fonts the highest prio
instead of following Vera ranking, and rename the subpackage accordingly
-- complete and clean up the Vera aliasing
+
+* Sun Jun 11 2006 Nicolas Mailhot - 2.7.0-0.1
+- preparation to 2.7.0 based on the current dejavu snapshot
* Mon May 15 2006 Nicolas Mailhot - 2.6.0-1
- 2.6.0