RHEL's rpmbuild wipes the docdir for a (sub-)package if any %doc
directives are present, prior to copying in the marked documentation.
This means we can't prepopulate this directory with the HTML
documentation during the %install phase.
Instead, move the HTML documentation to a temporary directory during
%install and mark the contents of this temporary directory with %doc.
Signed-off-by: Michael Chapman <mike(a)very.puzzling.org>
---
libvirt.spec.in | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 72815f4..a5b01df 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1491,8 +1491,8 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
%endif
-mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \
- $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version}
+# Copied into libvirt-docs subpackage eventually
+mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} libvirt-docs
%if %{with_dtrace}
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64
@@ -1732,12 +1732,7 @@ fi
%files docs
%defattr(-, root, root)
-%doc AUTHORS ChangeLog.gz NEWS README TODO
-
-# Website
-%dir %{_datadir}/doc/libvirt-docs-%{version}
-%dir %{_datadir}/doc/libvirt-docs-%{version}/html
-%{_datadir}/doc/libvirt-docs-%{version}/html/*
+%doc AUTHORS ChangeLog.gz NEWS README TODO libvirt-docs/*
# API docs
%dir %{_datadir}/gtk-doc/html/libvirt/
--
1.8.4.2