https://bugzilla.redhat.com/show_bug.cgi?id=1083941
--- Comment #22 from Michael Schwendt bugs.michael@gmx.net ---
%package doc Summary: Detailled html documentation for Giac/Xcas
Detailed HTML
Requires: %{name}%{?_isa} = %{version}-%{release} BuildArch: noarch
If it is "noarch", the dependency cannot be arch-specific. The noarch package will be copied into all repositories.
Further, plain documentation packages ought to be installable without having to install base package dependencies (i.e. the application and its dep-chain). Especially, if you can read the documentation with any external browser (e.g. PDF, HTML, …), separate documentation packages are a convenience for people who want to peruse/study them.
%doc %{_docdir}/giac/LICENSE
Files below %_docdir are marked as %doc implicitly. See: rpm -E %__docdir_path
Currently, the package does not include the %_docdir/giac directory:
https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Owner... https://fedoraproject.org/wiki/Packaging:UnownedDirectories
%{_datadir}/giac/doc/*/keywords %{_datadir}/giac/aide_cas
More "unowned" directories here: /usr/share/giac, /usr/share/giac/doc, /usr/share/giac/doc/* also at least one dir
%{_datadir}/icons/hicolor/128x128/apps/xcas.png
https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Owner...
%files doc %doc README COPYING README.fedora %{_datadir}/giac/ %{_docdir}/giac/
Oh, you've got the dependency chain backwards. The base package ought to include these dirs. Especially, since a line such as
%{_datadir}/giac/
includes not just the directory but everything in it. That sounds wrong for the -doc subpackage.
Alternatively, if there are many subpackages and many base dirs to include, a packaging technique to apply is to create a -filesystem subpackage, which contains the common empty dirs.
Plus, plain %doc for local files and %_docdir/giac conflict with eachother. Decide on either %doc or %_docdir/giac:
https://fedorahosted.org/fpc/ticket/338 https://fedoraproject.org/wiki/Changes/UnversionedDocdirs
To sum up, as of Fedora 20, the %doc magic stores files in %_docdir/%name - also known as the new macro %_pkgdocdir. As a side-effect, it includes the directory and everything in it, regardless of which files you specify in the %doc lines.
For this particular package, that currently only means the two lines
%doc README COPYING README.fedora %{_docdir}/giac/
include files more than once, since the former includes also the %_docdir/giac directory entry, and the latter includes it again plus everything in it (for Fedora 20 also the three files on the %doc line).