- Some software installs its own documentation and if you try to
combine it with %doc, rpmbuild will abort with mysterious
"cpio bad magic" or such errors because what was assumed to be
there was not, as %doc would 'rm -rf' the docdir upon first
invocation. I don't see any good reason to disallow sharing the
same directory for %doc and documentation installed by software
"make install" - the other alternative would be forcing %doc to
go to some other location, only making docs harder to find.
- Also at least Mageia (and prior to that Mandriva) has been doing
this for quite some time now.
appendStringBuf(pkg->specialDoc, "DOCDIR=$RPM_BUILD_ROOT");
appendLineStringBuf(pkg->specialDoc, pkg->specialDocDir);
appendLineStringBuf(pkg->specialDoc, "export DOCDIR");
- appendLineStringBuf(pkg->specialDoc, "rm -rf $DOCDIR");
appendLineStringBuf(pkg->specialDoc, mkdocdir);
free(mkdocdir);