How to split out doc subpackage properly

Hi,

I’m trying to split out documentation sub package in accordance to packaging guidelines and can’t figure out how to put files properly. For example in the https://build.opensuse.org/package/show?package=python-wxmpl&project=home%3Atermim package documentation goes to /usr/share/doc/packages/python-wxmpl-doc but I’d think that the better place is /usr/share/doc/packages/python-wxmpl. What is the proper way to achieve that?

Thanks,
Mikhail

If it is a substantial amount of documentation it should probably be in /usr/share/doc rather than /usr/share/doc/packages.

Normally /usr/share/doc/packages only holds README, ChangeLog, and COPYING/LICENSE files, not proper documentation.

Try something like this


%install  
%if 0%{?suse_version}  
python setup.py install --prefix %{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES  
%else  
python setup.py install --prefix %{_prefix} --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES  
%endif
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/doc/python-wxmpl
%{__install} -m644 -v reference demos $RPM_BUILD_ROOT%{_datadir}/doc/python-wxmpl/

...

%files doc  
%defattr (-, root, root)
%{_datadir}/doc/python-wxmpl
%docdir %{_datadir}/doc/python-wxmpl