%define req_libvirt_version 0.6.2 %if 0%{?suse_version} %define php_inidir %{_sysconfdir}/php5/conf.d %define php_extdir %{_libdir}/php5/extensions %else # Macro provided by php-devel %{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d }} %{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} # Fix private-shared-object-provides # RPM 4.8 %{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$} %{?filter_setup} # RPM 4.9 %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$ %endif %global extname libvirt-php %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: php-libvirt Version: 0.4.5 Release: 6%{?dist}%{?extra_release} Summary: PHP language binding for Libvirt %if 0%{?suse_version} Group: Development/Libraries/PHP %else Group: Development/Libraries %endif License: PHP URL: http://libvirt.org/php Source0: http://libvirt.org/sources/php/libvirt-php-%{version}.tar.gz # https://www.redhat.com/archives/libvir-list/2011-November/msg01476.html Patch0: libvirt-php54.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel BuildRequires: libvirt-devel >= %{req_libvirt_version} BuildRequires: libxml2-devel BuildRequires: libxslt %if 0%{?suse_version} BuildRequires: xhtml-dtd %else BuildRequires: xhtml1-dtds %endif Requires: libvirt >= %{req_libvirt_version} %if 0%{?suse_version} Requires: php5 %else # Requires php ABI Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %endif %description PHP language bindings for Libvirt API. For more details see: http://www.libvirt.org/php/ %package -n php-libvirt-doc Summary: Document of php-libvirt Group: Development/Libraries/PHP BuildArch: noarch Requires: php-libvirt = %{version} %description -n php-libvirt-doc PHP language bindings for Libvirt API. For more details see: http://www.libvirt.org/php/ http://www.php.net/ This package contain the document for php-libvirt. %prep %setup -q -n libvirt-php-%{version} %patch0 -p1 -b .php54 %build %configure ./configure --with-html-dir=%{_docdir} --with-html-subdir=$(echo %{_pkgdocdir} | sed -e 's|^%{_docdir}/||')/html --libdir=%{php_extdir} make # build is not parallel clean %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} install -pm 644 COPYING %{buildroot}%{_pkgdocdir} chmod +x %{buildroot}%{php_extdir}/%{extname}.so %check # simple module load test php --no-php-ini \ --define extension_dir=%{buildroot}%{php_extdir} \ --define extension=%{extname}.so \ --modules | grep libvirt %clean 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,-) %{_pkgdocdir}/html %changelog * Thu Dec 12 2013 Ville Skyttä - 0.4.5-6 - Install docs to %%{_pkgdocdir} where available (#994035). - Include COPYING in main package. - Disable parallel build. * Sun Aug 04 2013 Fedora Release Engineering - 0.4.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Mar 22 2013 Remi Collet - 0.4.5-4 - rebuild for http://fedoraproject.org/wiki/Features/Php55 * Thu Feb 14 2013 Fedora Release Engineering - 0.4.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Jul 20 2012 Fedora Release Engineering - 0.4.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jan 19 2012 Remi Collet - 0.4.5-1 - update to 0.4.5 (upstream is libvirt-php) - build against php 5.4.0, with patch - add filter to fix private-shared-object-provides - add %%check for php extension - use macro from latest php (php_inidir, php_extdir) - requires php ABI * Sat Jan 14 2012 Fedora Release Engineering - 0.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Aug 22 2011 Michal Novotny - 0.4.4 - Several bugfixes for VNC and updated SPEC file * Thu Aug 11 2011 Michal Novotny - 0.4.3 - Rebase to 0.4.3 from master branch * Tue Apr 19 2011 Michal Novotny - 0.4.1-5 - Minor memory leak fixes - Several bug fixes * Mon Apr 11 2011 Michal Novotny - 0.4.1-4 - Add new storagepool API functions - Add optional xPath argument for *_get_xml_desc() functions - Add new network API functions - Add new API functions to add/remove disks * Wed Mar 23 2011 Michal Novotny - 0.4.1-3 - Add connection information function - Add coredump support - Add snapshots support - Improve error reporting for destructors * Thu Mar 10 2011 Michal Novotny - 0.4.1-2 - Changes done to comply with Fedora package policy * Tue Feb 8 2011 Michal Novotny - 0.4.1 - Initial commit (from github)