]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: fix libvirt-docs subpackage on RHEL-6
authorMichael Chapman <mike@very.puzzling.org>
Wed, 20 Nov 2013 12:58:24 +0000 (12:58 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 20 Nov 2013 12:58:24 +0000 (12:58 +0000)
RHEL-6'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.

This fixes a build regression introduced in

  commit e23216da9a9318df920abb11b02582b81515c862
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Wed Sep 25 13:20:40 2013 -0400

    spec: Clean up distribution of ChangeLog (and others)

where the libvirt-docs sub-RPM gained a %doc directive, thus
triggering the RPM bug.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
libvirt.spec.in

index 72815f473dbee6048115c155e123358d0fab0993..a5b01dffbc22a180c96d5b64df2fa412a99258ee 100644 (file)
@@ -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/