3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
6 Summary: %{_modname} - event scheduling engine
7 Summary(pl): %{_modname} - silnik do planowania zdarzeñ
8 Name: php-pecl-%{_modname}
12 Group: Development/Languages/PHP
13 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5: f009fd3519c14a027a8c85414208b61c
15 URL: http://pecl.php.net/package/event/
16 BuildRequires: php-devel >= 3:5.0.0
17 BuildRequires: rpmbuild(macros) >= 1.238
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
20 Obsoletes: php-pear-%{_modname}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 This is an extension to efficiently schedule IO, time and signal based
25 events using the best available IO notification mechanism for your
28 This is a port of libevent to the PHP infrastructure; the API is
29 similar but not identical.
31 In PECL status of this extension is: %{_status}.
34 To rozszerzenie pozwala na efektywne planowanie We/Wy, czasu oraz
35 opartych na sygna³ach zdarzeñ za pomoc± najlepszego dostêpnego dla
36 systemu mechanizmu powiadamiania.
38 Jest to port biblioteki libevent do infrastruktury PHP; API jest
39 podobne, jednak nie identyczne.
41 To rozszerzenie ma w PECL status: %{_status}.
47 cd %{_modname}-%{version}
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
56 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
57 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
58 ; Enable %{_modname} extension module
59 extension=%{_modname}.so
63 rm -rf $RPM_BUILD_ROOT
66 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
67 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
71 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
72 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
76 %defattr(644,root,root,755)
77 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
78 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
79 %attr(755,root,root) %{extensionsdir}/%{_modname}.so