48ea128
%{!?php_inidir:  %global php_inidir  %{_sysconfdir}/php.d}
48ea128
%{!?__php:       %global __php       %{_bindir}/php}
48ea128
%{!?_pkgdocdir:  %global _pkgdocdir  %{_docdir}/%{name}-%{version}}
1cffd02
e01f2b7
%global  req_libvirt_version 1.2.13
48ea128
%global  extname             libvirt-php
9c91f53
%if "%{php_version}" < "5.6"
9c91f53
%global ini_name             %{extname}.ini
9c91f53
%else
9c91f53
%global ini_name             40-%{extname}.ini
9c91f53
%endif
1cffd02
Michal Novotny 6f03e2e
Name:		php-libvirt
01da2db
Version:	0.5.3
4d206eb
Release:	2%{?dist}
e01f2b7
Summary:	PHP language bindings for Libvirt
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
Group:		Development/Libraries
4d206eb
# libvirt-php is under the same terms as libvirt
4d206eb
License:	LGPLv2+
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
01da2db
BuildRequires:	php-pecl-imagick
Michal Novotny 6f03e2e
BuildRequires:	xhtml1-dtds
48ea128
Michal Novotny 6f03e2e
Requires:	libvirt >= %{req_libvirt_version}
1cffd02
Requires:	php(zend-abi) = %{php_zend_api}
1cffd02
Requires:	php(api) = %{php_core_api}
48ea128
35bb0b5
# For some reason, libvirt doesn't exist in RHEL 7 aarch64, but does on CentOS 7
1e63737
%if 0%{?rhel} == 7 && 0%{?centos} == 0
35bb0b5
ExcludeArch:    aarch64
35bb0b5
%endif
35bb0b5
e01f2b7
# Filter shared private - always as libvirt-php.so is a private extension
e01f2b7
%global __provides_exclude_from ^%{_libdir}/.*\\.so$
Michal Novotny 6f03e2e
48ea128
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
48ea128
e01f2b7
%package doc
e01f2b7
Summary:	Documentation for %{name}
48ea128
Group:		Development/Libraries
Michal Novotny 339d121
BuildArch:	noarch
e01f2b7
Requires:	%{name} = %{version}-%{release}
Michal Novotny 339d121
e01f2b7
%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
e01f2b7
This package contains the documentation for php-libvirt.
Michal Novotny 339d121
48ea128
Michal Novotny 6f03e2e
%prep
e01f2b7
%setup -q -n %{extname}-%{version}
1cffd02
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
%build
48ea128
%configure \
48ea128
  --with-html-dir=%{_docdir} \
48ea128
  --with-html-subdir=$(echo %{_pkgdocdir} | sed -e 's|^%{_docdir}/||')/html \
48ea128
  --libdir=%{php_extdir}
e01f2b7
%make_build
48ea128
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
%install
e01f2b7
%make_install
1cffd02
chmod +x %{buildroot}%{php_extdir}/%{extname}.so
1cffd02
9989c86
if [ -f %{buildroot}%{php_inidir}/%{extname}.ini ]; then
9989c86
  if [ "%{extname}.ini" != "%{ini_name}" ]; then
9989c86
    mv %{buildroot}%{php_inidir}/%{extname}.ini \
9989c86
       %{buildroot}%{php_inidir}/%{ini_name}
9989c86
  fi
9989c86
else
9989c86
  install -Dpm 644 src/libvirt-php.ini %{buildroot}%{php_inidir}/%{ini_name}
9c91f53
fi
9c91f53
01da2db
# Erase unnecessary libtool archive file
e01f2b7
rm %{buildroot}%{php_extdir}/%{extname}.la
e01f2b7
48ea128
1cffd02
%check
48ea128
: simple module load test
48ea128
%{__php} --no-php-ini \
48ea128
    --define extension=%{buildroot}%{php_extdir}/%{extname}.so \
1cffd02
    --modules | grep libvirt
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
Michal Novotny 6f03e2e
%files
e01f2b7
%license COPYING
8b40a51
%dir %{_pkgdocdir}
1cffd02
%{php_extdir}/%{extname}.so
9c91f53
%config(noreplace) %{php_inidir}/%{ini_name}
Michal Novotny 6f03e2e
48ea128
e01f2b7
%files doc
8b40a51
%{_pkgdocdir}/html
Michal Novotny 339d121
48ea128
Michal Novotny 6f03e2e
%changelog
4d206eb
* Thu May 11 2017 Neal Gompa <ngompa13@gmail.com> - 0.5.3-2
4d206eb
- Fix license tag to match actual source license
4d206eb
01da2db
* Thu May 11 2017 Neal Gompa <ngompa13@gmail.com> - 0.5.3-1
01da2db
- Upgrade to 0.5.3
01da2db
5fa4597
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
5fa4597
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5fa4597
ab85705
* Mon Nov 14 2016 Remi Collet <remi@fedoraproject.org> - 0.5.2-3
ab85705
- rebuild for https://fedoraproject.org/wiki/Changes/php71
ab85705
9989c86
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 0.5.2-2
9989c86
- rebuild for https://fedoraproject.org/wiki/Changes/php70
9989c86
e01f2b7
* Sat Jun 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.5.2-1
e01f2b7
- Upgrade to 0.5.2
e01f2b7
486dd46
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.8-6
486dd46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
486dd46
bf6116b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-5
bf6116b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
bf6116b
faa56e1
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-4
faa56e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
faa56e1
9c91f53
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> - 0.4.8-3
9c91f53
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
9c91f53
- add numerical prefix to extension configuration file
9c91f53
ab38dbe
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.8-2
ab38dbe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ab38dbe
48ea128
* Mon Jan  6 2014 Remi Collet <remi@fedoraproject.org> - 0.4.8-1
48ea128
- update to 0.4.8
48ea128
- spec cleanups
48ea128
8b40a51
* Thu Dec 12 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4.5-6
8b40a51
- Install docs to %%{_pkgdocdir} where available (#994035).
8b40a51
- Include COPYING in main package.
f98a3d8
- Disable parallel build.
8b40a51
7280956
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-5
7280956
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7280956
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
48ea128
* Tue Feb  8 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1
Michal Novotny 6f03e2e
- Initial commit (from github)