summaryrefslogtreecommitdiffstats
path: root/php-libvirt.spec
blob: e9198ccd258116a0e30fd87f4a3c17c56ff4e7aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
%global		req_libvirt_version 0.6.2
%global		php_confdir %{_sysconfdir}/php.d
%global		php_extdir  %{_libdir}/php/modules

%global         extname   libvirt-php

Name:		php-libvirt
Version:	0.4.5
Release:	2%{?dist}%{?extra_release}.1
Summary:	PHP language binding for Libvirt

Group:		Development/Libraries
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
BuildRequires:	xhtml1-dtds

Requires:	libvirt >= %{req_libvirt_version}
Requires:	php(zend-abi) = %{php_zend_api}
Requires:	php(api) = %{php_core_api}

%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
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
BuildArch:	noarch
%endif
Requires:	php-libvirt = %{version}-%{release}

%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.

# Filter private provides
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}


%prep
%setup -q -n libvirt-php-%{version}

%patch0 -p1 -b .php54


%build
%configure --with-html-dir=%{_datadir}/doc \
           --with-html-subdir=%{name}-%{version}/html \
           --libdir=%{php_extdir}
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

chmod +x %{buildroot}%{php_extdir}/%{extname}.so

%check
# simple module load test
%{__php} --no-php-ini \
    --define extension_dir=src \
    --define extension=%{extname}.so \
    --modules | grep libvirt


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc
%{php_extdir}/%{extname}.so
%config(noreplace) %{php_confdir}/%{extname}.ini

%files -n php-libvirt-doc
%defattr(-,root,root,-)
%doc README
%dir %{_datadir}/doc/%{name}-%{version}
%{_datadir}/doc/%{name}-%{version}/html


%changelog
* Tue Jan  8 2013 Remi Collet <remi@fedoraproject.org> - 0.4.5-2
- rebuild

* Sun Nov 27 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.4.5-1
- update to 0.4.5
- fix for php 5.4 (and some of compiler warnings)
  https://www.redhat.com/archives/libvir-list/2011-November/msg01476.html

* Tue Aug 23 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.4.4-1
- rebuild for remi repo

* Mon Aug 22 2011 Michal Novotny <minovotn@redhat.com> - 0.4.4
- Several bugfixes and updated SPEC file and codes not to require open tags

* Sun Aug 21 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.4.3-1
- rebuild for remi repo

* Thu Aug 11 2011 Michal Novotny <minovotn@redhat.com> - 0.4.3
- Rebase to 0.4.3 from master branch

* Sat Jul 16 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.4.1-5
- rebuild for remi repo

* Tue Apr 19 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-5
- Minor memory leak fixes
- Several bug fixes

* Mon Apr 11 2011 Michal Novotny <minovotn@redhat.com> - 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 <minovotn@redhat.com> - 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 <minovotn@redhat.com> - 0.4.1-2
- Changes done to comply with Fedora package policy

* Tue Feb 8 2011 Michal Novotny <minovotn@redhat.com> - 0.4.1-1
- Initial commit (from github)