[php-libvirt] Install docs to %{_pkgdocdir} where available (#994035).

Ville Skyttä scop at fedoraproject.org
Thu Dec 12 18:25:15 UTC 2013


commit 8b40a5173670cdce47ac05696c9bdd400d2175e3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Dec 12 20:25:16 2013 +0200

    Install docs to %{_pkgdocdir} where available (#994035).
    
    - Include COPYING in main package.

 php-libvirt.spec |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/php-libvirt.spec b/php-libvirt.spec
index f7341b1..48bcfda 100644
--- a/php-libvirt.spec
+++ b/php-libvirt.spec
@@ -18,10 +18,11 @@
 
 %global         extname   libvirt-php
 
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
 
 Name:		php-libvirt
 Version:	0.4.5
-Release:	5%{?dist}%{?extra_release}
+Release:	6%{?dist}%{?extra_release}
 Summary:	PHP language binding for Libvirt
 
 %if 0%{?suse_version}  
@@ -80,12 +81,13 @@ This package contain the document for php-libvirt.
 
 %build
 %configure
-./configure --with-html-dir=%{_datadir}/doc --with-html-subdir=%{name}-%{version}/html --libdir=%{php_extdir}
+./configure --with-html-dir=%{_docdir} --with-html-subdir=$(echo %{_pkgdocdir} | sed -e 's|^%{_docdir}/||')/html --libdir=%{php_extdir}
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
+install -pm 644 COPYING %{buildroot}%{_pkgdocdir}
 chmod +x %{buildroot}%{php_extdir}/%{extname}.so
 
 %check
@@ -100,16 +102,20 @@ rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
+%dir %{_pkgdocdir}
+%{_pkgdocdir}/COPYING
 %{php_extdir}/%{extname}.so
 %config(noreplace) %{php_inidir}/%{extname}.ini
 
 %files -n php-libvirt-doc
 %defattr(-,root,root,-)
-%doc
-%dir %{_datadir}/doc/%{name}-%{version}
-%{_datadir}/doc/%{name}-%{version}/html
+%{_pkgdocdir}/html
 
 %changelog
+* Thu Dec 12 2013 Ville Skyttä <ville.skytta at iki.fi> - 0.4.5-6
+- Install docs to %%{_pkgdocdir} where available (#994035).
+- Include COPYING in main package.
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.5-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list