287d162
%{!?php_inidir:  %global php_inidir  %{_sysconfdir}/php.d}
287d162
%{!?__php:       %global __php       %{_bindir}/php}
287d162
%{!?_pkgdocdir:  %global _pkgdocdir  %{_docdir}/%{name}-%{version}}
1cffd02
a07d08d
%global  req_libvirt_version 1.2.13
287d162
%global  extname             libvirt-php
a07d08d
%if "%{php_version}" < "5.6"
a07d08d
%global ini_name             %{extname}.ini
a07d08d
%else
a07d08d
%global ini_name             40-%{extname}.ini
a07d08d
%endif
1cffd02
Michal Novotny 6f03e2e
Name:		php-libvirt
a07d08d
Version:	0.5.2
287d162
Release:	1%{?dist}
a07d08d
Summary:	PHP language bindings for Libvirt
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
Group:		Development/Libraries
Michal Novotny 7e2a172
License:	PHP
Michal Novotny 6f03e2e
URL:		http://libvirt.org/php
1cffd02
Source0:	http://libvirt.org/sources/php/libvirt-php-%{version}.tar.gz
1cffd02
Michal Novotny 6f03e2e
BuildRequires:	php-devel
Michal Novotny 6f03e2e
BuildRequires:	libvirt-devel >= %{req_libvirt_version}
Michal Novotny 6f03e2e
BuildRequires:	libxml2-devel
Michal Novotny 6f03e2e
BuildRequires:	libxslt
Michal Novotny 6f03e2e
BuildRequires:	xhtml1-dtds
287d162
Michal Novotny 6f03e2e
Requires:	libvirt >= %{req_libvirt_version}
1cffd02
Requires:	php(zend-abi) = %{php_zend_api}
1cffd02
Requires:	php(api) = %{php_core_api}
287d162
a07d08d
# Filter shared private - always as libvirt-php.so is a private extension
a07d08d
%global __provides_exclude_from ^%{_libdir}/.*\\.so$
Michal Novotny 6f03e2e
287d162
Michal Novotny 6f03e2e
%description
Michal Novotny 6f03e2e
PHP language bindings for Libvirt API. 
Michal Novotny 6f03e2e
For more details see: http://www.libvirt.org/php/
Michal Novotny 6f03e2e
287d162
a07d08d
%package doc
a07d08d
Summary:	Documentation for %{name}
287d162
Group:		Development/Libraries
Michal Novotny 339d121
BuildArch:	noarch
a07d08d
Requires:	%{name} = %{version}-%{release}
Michal Novotny 339d121
a07d08d
%description doc
Michal Novotny 339d121
PHP language bindings for Libvirt API. 
Michal Novotny 339d121
For more details see: http://www.libvirt.org/php/ http://www.php.net/
Michal Novotny 339d121
a07d08d
This package contains the documentation for php-libvirt.
Michal Novotny 339d121
287d162
Michal Novotny 6f03e2e
%prep
a07d08d
%setup -q -n %{extname}-%{version}
1cffd02
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
%build
287d162
%configure \
287d162
  --with-html-dir=%{_docdir} \
287d162
  --with-html-subdir=$(echo %{_pkgdocdir} | sed -e 's|^%{_docdir}/||')/html \
287d162
  --libdir=%{php_extdir}
a07d08d
%make_build
Michal Novotny 6f03e2e
287d162
Michal Novotny 6f03e2e
%install
a07d08d
%make_install
1cffd02
chmod +x %{buildroot}%{php_extdir}/%{extname}.so
1cffd02
a07d08d
if [ "%{extname}.ini" != "%{ini_name}" ]; then
a07d08d
  mv %{buildroot}%{php_inidir}/%{extname}.ini \
a07d08d
     %{buildroot}%{php_inidir}/%{ini_name}
a07d08d
fi
a07d08d
a07d08d
# Buildsystem installs as if it's normal shared object.
a07d08d
# Fix it so that it's actually correct.
a07d08d
rm %{buildroot}%{php_extdir}/%{extname}.la
a07d08d
rm %{buildroot}%{php_extdir}/%{extname}.so
a07d08d
rm %{buildroot}%{php_extdir}/%{extname}.so.0
a07d08d
mv %{buildroot}%{php_extdir}/%{extname}.so.0.0.0 %{buildroot}%{php_extdir}/%{extname}.so
a07d08d
287d162
1cffd02
%check
287d162
: simple module load test
287d162
%{__php} --no-php-ini \
287d162
    --define extension=%{buildroot}%{php_extdir}/%{extname}.so \
1cffd02
    --modules | grep libvirt
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
%files
a07d08d
%license COPYING
287d162
%dir %{_pkgdocdir}
1cffd02
%{php_extdir}/%{extname}.so
a07d08d
%config(noreplace) %{php_inidir}/%{ini_name}
Michal Novotny 6f03e2e
287d162
a07d08d
%files doc
287d162
%{_pkgdocdir}/html
287d162
Michal Novotny 339d121
Michal Novotny 6f03e2e
%changelog
a07d08d
* Sat Jun 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.5.2-1
a07d08d
- Upgrade to 0.5.2
a07d08d
a07d08d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.8-6
a07d08d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a07d08d
a07d08d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-5
a07d08d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a07d08d
a07d08d
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-4
a07d08d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a07d08d
a07d08d
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> - 0.4.8-3
a07d08d
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
a07d08d
- add numerical prefix to extension configuration file
a07d08d
a07d08d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-2
a07d08d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a07d08d
287d162
* Mon Jan  6 2014 Remi Collet <remi@fedoraproject.org> - 0.4.8-1
287d162
- update to 0.4.8
287d162
- spec cleanups
a07d08d
a07d08d
* Thu Dec 12 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4.5-6
a07d08d
- Install docs to %%{_pkgdocdir} where available (#994035).
287d162
- Include COPYING in main package.
a07d08d
- Disable parallel build.
287d162
287d162
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-5
287d162
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
287d162
Remi Collet d354b9f
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 0.4.5-4
Remi Collet d354b9f
- rebuild for http://fedoraproject.org/wiki/Features/Php55
Remi Collet d354b9f
ae4438c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-3
ae4438c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ae4438c
ddf1267
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-2
ddf1267
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ddf1267
1cffd02
* Thu Jan 19 2012 Remi Collet <remi@fedoraproject.org> - 0.4.5-1
1cffd02
- update to 0.4.5 (upstream is libvirt-php)
1cffd02
- build against php 5.4.0, with patch
1cffd02
- add filter to fix private-shared-object-provides
1cffd02
- add %%check for php extension
1cffd02
- use macro from latest php (php_inidir, php_extdir)
1cffd02
- requires php ABI
1cffd02
a503e31
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-3
a503e31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a503e31
Michal Novotny 7e2a172
* Mon Aug 22 2011 Michal Novotny <minovotn@redhat.com> - 0.4.4
Michal Novotny e8848be
- Several bugfixes for VNC and updated SPEC file
Michal Novotny e8848be
Michal Novotny e8848be
* Thu Aug 11 2011 Michal Novotny <minovotn@redhat.com> - 0.4.3
Michal Novotny e8848be
- Rebase to 0.4.3 from master branch
Michal Novotny e8848be
Michal Novotny e8848be
* Tue Apr 19 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-5
Michal Novotny e8848be
- Minor memory leak fixes
Michal Novotny e8848be
- Several bug fixes
Michal Novotny e8848be
Michal Novotny e8848be
* Mon Apr 11 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-4
Michal Novotny e8848be
- Add new storagepool API functions
Michal Novotny e8848be
- Add optional xPath argument for *_get_xml_desc() functions
Michal Novotny e8848be
- Add new network API functions
Michal Novotny e8848be
- Add new API functions to add/remove disks
Michal Novotny e8848be
Michal Novotny e8848be
* Wed Mar 23 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-3
Michal Novotny e8848be
- Add connection information function
Michal Novotny e8848be
- Add coredump support
Michal Novotny e8848be
- Add snapshots support
Michal Novotny e8848be
- Improve error reporting for destructors
Michal Novotny e8848be
Michal Novotny e8848be
* Thu Mar 10 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-2
Michal Novotny e8848be
- Changes done to comply with Fedora package policy
Michal Novotny 6f03e2e
287d162
* Tue Feb  8 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1
Michal Novotny 6f03e2e
- Initial commit (from github)