CPack RPM can't deal with man pages properly, as it is not able to find them because rpmbuild compressed them
when running cpack for RPM including some man pages files in a directory,
rpmbuild will compress them and remove the original files,
this will mismatch with the generated spec file that can't find the files.
besides the generated spec looks almost correct:
%dir "/usr/share/man"
%dir "/usr/share/man/man1"
"/usr/share/man/man1/myapp.1*"
the content in that folder instead of having files in the myapp.1
folder, there is the compressed file, myapp.1.gz
in my case.
the output resulting is:
error: File not found: [...]/usr/share/man/man1/myapp.1\*
The fix is to replace the "/usr/share/man/man1/myapp.1*"
with: %{_mandir}/man1/myapp.1*
when CPackRPM generates the spec file
Edited by Raffaello Bertini