1 %define _modname xdebug
3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - provides functions for functions traces and profiling
6 Summary(pl.UTF-8): %{_modname} - funkcje do śledzenia i profilowania funkcji
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: 0735584168c8c9f111252128d0076d7c
15 URL: http://pecl.php.net/package/xdebug/
16 BuildRequires: libedit-devel
17 BuildRequires: libtool >= 2:2.2
18 BuildRequires: php-devel >= 3:5.0.0
19 BuildRequires: rpmbuild(macros) >= 1.344
20 Requires: %{_sysconfdir}/conf.d
21 %{?requires_zend_extension}
22 Conflicts: ZendOptimizer
23 Obsoletes: php-pear-%{_modname}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 The Xdebug extension helps you debugging your script by providing a
28 lot of valuable debug information. The debug information that Xdebug
29 can provide includes the following:
31 - stack and function traces in error messages with:
32 - full parameter display for user defined functions
33 - function name, file name and line indications
34 - support for member functions memory allocation
35 - protection for infinite recursions
39 - profiling information for PHP scripts
40 - script execution analysis
41 - capabilities to debug your scripts interactively with a debug client
43 In PECL status of this package is: %{_status}.
45 %description -l pl.UTF-8
46 Rozszerzenie Xdebug pomaga przy odpluskwianiu skryptu dostarczając
47 dużo wartościowych informacji. Informacje przydatne do śledzenia,
48 które może zapewnić Xdebug, obejmują:
50 - śledzenie stosu i funkcji w komunikatach błędów wraz z:
51 - pełnym wyświetlaniem parametrów dla funkcji zdefiniowanych przez
53 - nazwami funkcji, nazwami plików i numerami linii
55 - przydzielanie pamięci
56 - zabezpieczenie przed nieskończoną rekurencją
58 Xdebug dostarcza także:
60 - informacje do profilowania skryptów PHP
61 - analizę wywołań skryptu
62 - możliwość śledzenia skryptów interaktywnie przy pomocy klienta
65 To rozszerzenie ma w PECL status: %{_status}.
69 chmod +x %{_modname}-%{version}/debugclient/configure
70 cp %{SOURCE1} %{_modname}.ini
71 sed -e 's#^;zend_extension.*#zend_extension%{?zend_zts:_ts}=%{extensionsdir}/%{_modname}.so#' -i %{_modname}.ini
74 cd %{_modname}-%{version}
76 # libtool 2.2 build fix
77 if [ -f /usr/share/aclocal/ltsugar.m4 ]; then
78 cat /usr/share/aclocal/ltsugar.m4 >> config.m4
79 cat /usr/share/aclocal/ltsugar.m4 >> debugclient/aclocal.m4
81 cat /usr/share/aclocal/ltversion.m4 >> config.m4
82 cat /usr/share/aclocal/ltversion.m4 >> debugclient/aclocal.m4
84 cat /usr/share/aclocal/lt~obsolete.m4 >> config.m4
85 cat /usr/share/aclocal/lt~obsolete.m4 >> debugclient/aclocal.m4
87 cat /usr/share/aclocal/ltoptions.m4 >> config.m4
88 cat /usr/share/aclocal/ltoptions.m4 >> debugclient/aclocal.m4
90 cat /usr/share/aclocal/libtool.m4 >> debugclient/aclocal.m4
97 install /usr/share/automake/{config.*,depcomp} .
98 %{__libtoolize} --install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/conf.d,%{extensionsdir}}
109 install %{_modname}-*/debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}/%{_modname}-debugclient
110 install %{_modname}-*/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
111 install %{_modname}.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
114 rm -rf $RPM_BUILD_ROOT
117 %php_webserver_restart
120 if [ "$1" = 0 ]; then
121 %php_webserver_restart
125 %defattr(644,root,root,755)
126 %doc %{_modname}-*/{README,NEWS,Changelog,CREDITS,xt.vim}
127 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
128 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
129 %attr(755,root,root) %{_bindir}/*