"David C. Rankin"
All,
I need help. I am working on packaging WordNet. Doing so, I have 5 doc files in the base directory of the source packages I want in the documentation directory of the final package:
%doc AUTHORS ChangeLog COPYING LICENSE README
Fine - works, puts the files in /usr/share/doc/packages/WordNet where I want them. However, I also have the html, pdf, and ps documentation directories I want to put in that SAME directory. In the %install section I create the directory and move the documentation dirs (html,pdf,ps) to /usr/share/doc/packages/WordNet with the following:
# Make proper document dir, mv doc files, rm old doc dir mkdir -p %{buildroot}/usr/share/doc/packages/WordNet mv %{buildroot}/usr/doc/* %{buildroot}/usr/share/doc/packages/WordNet rm -rf %{buildroot}/usr/doc/
I then add:
%files ... %docdir /usr/share/doc /usr/share/doc
rpmbuild completes fine, but NONE of the (html,pdf,or ps) directories are present in the final package. None of these exists:
/usr/share/doc/packages/WordNet/html /usr/share/doc/packages/WordNet/pdf /usr/share/doc/packages/WordNet/ps
Grr.. From research I found that this was due to the %doc AUTHORS... line wiping out everything else in the /usr/share/doc/packages/WordNet directory -- the reason given: "that is just rpm being dumb, that's just the way it has always been." But there was no explanation how to fix this issue.
It seems simple. All I want to do is move the documentation from
%{buildroot}/usr/doc/{html,pdf,ps}
to
%{buildroot}/usr/doc/packages/WordNet/{html,pdf,ps}
and include those directories along with the files AUTHORS ChangeLog COPYING LICENSE and README. But how do I do it without the first %doc line wiping them out?
I have given up in the interim and just created a %{buildroot}/usr/doc/packages/WordNet-docs directory and move the html, pdf and ps directories there, but I really would like all documentation under /usr/share/doc/packages/WordNet. How do I do that??
Here is my current %files setup.
%files %defattr(-,root,root) /usr/bin /usr/include /usr/lib64 /usr/lib /usr/share/applications /usr/share/pixmaps /usr/share/wordnet %doc AUTHORS ChangeLog COPYING LICENSE README %docdir /usr/share/doc/packages/WordNet-docs /usr/share/doc/packages/WordNet-docs
What say the masters? What is the trick?
The full spec file is here:
If you have a bugzilla account, you have build.opensuse.com account. Using OBS and the associated osc command is one of the greatest benefits of being a opensuse user/packager. You should check it out. And all opensuse lists except the user lists like this one and the equivalent language (e.g.. German) lists are open to non-subscribers. Just email the appropriate address and say you aren't subscribed and ask to be kept in copy of replies. As to your question, I think you can have directories on the %doc line, so assuming there is a folder named "documentation" in the source folder, just do %doc AUTHORS ChangeLog COPYING LICENSE README documentation %doc is a macro that creates the doc dir, copies files (and I think folders) to it, then includes the copied files (and folders?) in the rpm. If you don't want to have a directory and have just the files, then list them individually. %doc AUTHORS ChangeLog COPYING LICENSE README documentation/* If the files have to be created, then create them in them in the %build section. Don't install anything for that folder manually at all. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org