From Fedora Project Wiki

< PackagingDrafts

Revision as of 13:56, 12 October 2008 by Nim (talk | contribs) (New page: This is a modification proposal for our official fonts spec template. == Current situation == In the interest of KISS, and since upstream's ''conf.avail''...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a modification proposal for our official fonts spec template.

Current situation

In the interest of KISS, and since upstream's conf.avail/conf.d feels un-fedorish (we filter apache conf.d on extension for example), the template currently installs fontconfig rules directly in %{_sysconfdir}/fonts/conf.d.


 %define fontconfdir %{_sysconfdir}/fonts/conf.d
 …
 %install
 …
 install -m 0755 -d %{buildroot}%{fontconfdir}
 install -m 0644 -p %{SOURCE1} %{buildroot}%{fontconfdir}/…-%{fontname}.conf
 …
 %files
 …
 %config(noreplace) %{fontconfdir}…-%{fontname}.conf

(This has been good enough for some of our major font packages for a long time).

Problem

However our fontconfig package does deploy upstream's conf.avail/conf.d separation. And users have started have started filling bugs on packages that do not follow this rule. Anything user-visible is a problem.

Proposed change

In the interest of stemming the potential user report flood, and since adhering closely to upstream is generally considered good, I propose to change the template in

 %define fontconfdir %{_sysconfdir}/fonts/
 …
 %install
 …
 install -m 0755 -d %{buildroot}%{fontconfdir}conf.{avail,d}
 install -pm 0644 -p %{SOURCE1}\
         %{buildroot}%{fontconfdir}conf.avail/…-%{fontname}.conf
 …
 pushd %{buildroot}%{fontconfdir}conf.d
   ln -s ../conf.avail/*.conf .
 popd
 …
 %files
 …
 %config            %{fontconfdir}conf.avail/…-%{fontname}.conf
 %config(noreplace) %{fontconfdir}conf.d/…-%{fontname}.conf