提交 caaeb691 编写于 作者: M Michael Chapman 提交者: Daniel P. Berrange

spec: fix libvirt-docs subpackage on RHEL-6

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 e23216da
  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: NMichael Chapman <mike@very.puzzling.org>
上级 a18fa05a
......@@ -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/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册