Re: Doc packaging questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-07-23 23:00, T.C. Hollingsworth wrote:
> On Tue, Jul 23, 2013 at 12:33 PM, Ville Skyttä <ville.skytta@xxxxxx> wrote:
>> Related to the unversioned docdirs F-20 feature [1], here's a couple of
>> questions:
>>
>> 1) Should specfiles be using %{_docdir} or %{_defaultdocdir} when
>> referring to the /usr/share/doc dir? Both seem to work, both are being
>> used. To me %{_docdir} sounds better for some reason.
> 
> Only the latter one seems to work?

Both do work. %{_docdir} is defined by rpmbuild at specfile parse time,
so you can't --eval it.

>> 2) Packages that want to refer to the doc dir created by the special
>> %doc form need to take %{_docdir_fmt} into account. I didn't find a nice
>> way to do it, but here's one uglyish way to define a variable in
>> specfiles that should point to the correct location before and after the
>> %{_docdir_fmt} change (everything on one row):
>>
>> %global pkgdocdir %{_docdir}/%{?_docdir_fmt:%{expand:%(echo
>> '%{_docdir_fmt}' | tr A-Z a-z)}}%{!?_docdir_fmt:%{name}-%{version}}
> 
> Why not just define %{pkgdocdir} in redhat-rpm-config instead of
> making everyone do this in spec files?

That'd be better, yes, but I'll note that it's only a smallish subset of
packages that need this, not "everyone".

Anyway, exactly HOW to define it is my main question at the moment.
%{_docdir_fmt} is a bit special because it's run through headerFormat()
which AFAIK isn't available for use in macros or specfiles, hence the
hackish expansion of the lowercased version of its value in the above
implementation.
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging





[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux