[CMake] Documentation in RPM Package
Paul Londino
londinop at gmail.com
Tue Dec 20 15:53:58 EST 2016
Hello,
I am trying to create an RPM package using CPack. I am having trouble
packaging the documentation. There is a custom target that generates
HTML using DoxyGen (in a folder called html), and this gets installed
to /usr/doc/share during the packaging process. However, this
generates 12,000+ files which are all added individually to the .spec
file.
What I would like to do is just add the whole doc directory to the RPM
package using the %doc attribute so the RPM correctly installs this in
the package-named subfolder of /usr/share/doc and marks it as
documentation. I experimented with the
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST variable but this doesn't seem to
work on a wildcard basis and excluding all 12,000 generated files by
hand does not seem practical. Also, I was able to generate the %doc
attribute using CPACK_RPM_USER_FILELIST, but I believe in order to
have the auto-generated doc dir, it needs to be a relative path
instead of absolute, which I had problems setting using the CMAKE
variable (this could be more an RPM issue than a CMAKE one).
Any ideas in the best way to achieve what I'm trying to do? I could
try using a custom .spec file but there is a lot of value in the
automatically generated one from the CMake, so I would prefer to use
that if possible.
Thanks in advance for any assistance.
-Paul
More information about the CMake
mailing list