-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I want a spec file with something like:
%files devel-doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/devel/
%files doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/
Where doc/%{name}-%{version} contains end user documentation, and doc/%{name}-%{version}/devel contains developer documentation, mainly doxygen generated html.
However, that seems to put the developer documentation into the -doc subpackage in addition to the -devel-doc subpackage. Is there a way to do this so that we have a single doc/%{name}-%{version} directory owned by the -doc subpackage, and it contains doc/%{name}-%{version}/devel owned by the -devel-doc subpackage (which of course depends on the -doc subpackage)?
Carl Byington wrote:
I want a spec file with something like:
%files devel-doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/devel/
%files doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/
Where doc/%{name}-%{version} contains end user documentation, and doc/%{name}-%{version}/devel contains developer documentation, mainly doxygen generated html.
However, that seems to put the developer documentation into the -doc subpackage in addition to the -devel-doc subpackage. Is there a way to do this so that we have a single doc/%{name}-%{version} directory owned by the -doc subpackage, and it contains doc/%{name}-%{version}/devel owned by the -devel-doc subpackage (which of course depends on the -doc subpackage)?
Referencing a directory in the %files section automatically adds all files under that directory to the package. Putting %dir in front of the directory allows you to own the directory but not recursively add its contents.
You probably want something like:
%files doc %defattr(-,root,root,-) %dir %{_datadir}/doc/%{name}-%{version}/ %{_datadir}/doc/%{name}-%{version}/file1 %{_datadir}/doc/%{name}-%{version}/file2 ...
Carl Byington wrote:
I want a spec file with something like:
%files devel-doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/devel/
%files doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/
Where doc/%{name}-%{version} contains end user documentation, and doc/%{name}-%{version}/devel contains developer documentation, mainly doxygen generated html.
However, that seems to put the developer documentation into the -doc subpackage in addition to the -devel-doc subpackage. Is there a way to do this so that we have a single doc/%{name}-%{version} directory owned by the -doc subpackage, and it contains doc/%{name}-%{version}/devel owned by the -devel-doc subpackage (which of course depends on the -doc subpackage)?
Two choices:
1) Don't install the user documentation in %install. Then have this files entry:
%files doc %doc userdocs/*
2) Use %exclude:
%files doc %{_defaultdocdir}/%{name}-%{version}/ %exclude %{_defaultdocdir}/%{name}-%{version}/devel/
%exclude throws off rpm's size calculation so it's not the preferred method, but it can be easier to implement.
-Toshio
On Mon, 13 Apr 2009, Toshio Kuratomi wrote:
Carl Byington wrote:
I want a spec file with something like:
%files devel-doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/devel/
%files doc %defattr(-,root,root,-) %{_datadir}/doc/%{name}-%{version}/
Where doc/%{name}-%{version} contains end user documentation, and doc/%{name}-%{version}/devel contains developer documentation, mainly doxygen generated html.
However, that seems to put the developer documentation into the -doc subpackage in addition to the -devel-doc subpackage. Is there a way to do this so that we have a single doc/%{name}-%{version} directory owned by the -doc subpackage, and it contains doc/%{name}-%{version}/devel owned by the -devel-doc subpackage (which of course depends on the -doc subpackage)?
Two choices:
- Don't install the user documentation in %install. Then have this
files entry:
%files doc %doc userdocs/*
- Use %exclude:
%files doc %{_defaultdocdir}/%{name}-%{version}/ %exclude %{_defaultdocdir}/%{name}-%{version}/devel/
%exclude throws off rpm's size calculation so it's not the preferred method, but it can be easier to implement.
FWIW, this has been fixed since rpm 4.6.0, excludes and duplicate entries no longer screw up the size calculation.
- Panu -