devel: require proper version, not just any
[packages/php-pecl-propro.git] / php-pecl-propro.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname         propro
3 %define         status          stable
4 Summary:        %{modname} - Property proxy
5 Name:           %{php_name}-pecl-%{modname}
6 Version:        1.0.0
7 Release:        2
8 License:        BSD, revised
9 Group:          Development/Languages/PHP
10 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
11 # Source0-md5:  9c775035fd17c65f0162b7eb1b4f8564
12 URL:            http://pecl.php.net/package/propro/
13 BuildRequires:  %{php_name}-devel >= 3:5.3.0
14 BuildRequires:  rpmbuild(macros) >= 1.650
15 %{?requires_php_extension}
16 Provides:       php(%{modname}) = %{version}
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 A reusable split-off of pecl_http's property proxy API.
21
22 In PECL status of this extension is: %{status}.
23
24 %package devel
25 Summary:        Header files for propro PECL extension
26 Group:          Development/Libraries
27 # does not require base
28 Requires:       %{php_name}-devel >= 4:5.2.0
29
30 %description devel
31 Header files for propro PECL extension.
32
33 %prep
34 %setup -qc
35 mv %{modname}-%{version}/* .
36
37 %build
38 phpize
39 %{__libtoolize}
40 %configure
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
46
47 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
48 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
49 ; Enable %{modname} extension module
50 extension=%{modname}.so
51 EOF
52
53 install -p -D php_propro.h $RPM_BUILD_ROOT%{_includedir}/php/ext/propro/php_propro.h
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 %php_webserver_restart
60
61 %postun
62 if [ "$1" = 0 ]; then
63         %php_webserver_restart
64 fi
65
66 %files
67 %defattr(644,root,root,755)
68 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
69 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
70
71 %files devel
72 %defattr(644,root,root,755)
73 %dir %{php_includedir}/ext/propro
74 %{php_includedir}/ext/propro/php_propro.h
This page took 0.031513 seconds and 3 git commands to generate.