1 %define _modname intercept
3 %define _sysconfdir /etc/php4
4 %define extensionsdir %{_libdir}/php4
6 Summary: %{_modname} - intercept function/method calls
7 Summary(pl.UTF-8): %{_modname} - przechwytywanie wywołań funkcji/metod
8 Name: php4-pecl-%{_modname}
12 Group: Development/Languages/PHP
13 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5: 442121f4043984cdde213918266a925c
15 URL: http://pecl.php.net/package/intercept/
16 BuildRequires: php4-devel >= 4.0.0
17 BuildRequires: rpmbuild(macros) >= 1.322
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
20 Obsoletes: php-pear-%{_modname}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Allows the user to have a user-space function called when the
25 specified function is called. Support for class/object methods will be
28 In PECL status of this extension is: %{_status}.
30 %description -l pl.UTF-8
31 Pozwala użytkownikowi na określenie funkcji w przestrzeni użytkownika
32 wywoływanej, gdy określona funkcja jest wywołana. Wsparcie dla metod
33 klas/obiektów zostanie dodane w późniejszych wersjach.
35 To rozszerzenie ma w PECL status: %{_status}.
41 cd %{_modname}-%{version}
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
50 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
51 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
52 ; Enable %{_modname} extension module
53 extension=%{_modname}.so
57 rm -rf $RPM_BUILD_ROOT
60 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
61 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
65 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
66 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
70 %defattr(644,root,root,755)
71 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
72 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
73 %attr(755,root,root) %{extensionsdir}/%{_modname}.so