[Fedora-packaging] %doc removal behavior

Braden McDaniel braden at endoframe.com
Wed Oct 14 09:01:14 UTC 2009

I'm trying to move some API docs to a -doc subpackage.  I'd like to
install these docs to /usr/share/doc/%{name}-%{version} (which
corresponds to where "make install" puts them); so I do

        %files doc
        %doc %{_docdir}/%{name}-%{version}/manual
instead of

        %files doc
        %doc doc/manual

However, I'd like to leave README and similar in the main package, where
I have


The problem I'm running into is that in the course of packaging the docs
for the main package, rpm does

        rm -rf %{_docdir}/%{name}-%{version}

So, when it subsequently tries to package the docs for the -doc
subpackage, the "manual" subdirectory (that was put there by "make
install") has been blown away.

What can I do here? Is it possible to suppress the "rm -rf" that %doc

Braden McDaniel <braden at endoframe.com>

More information about the Fedora-packaging mailing list