3 %bcond_without vim # make vim syntax package
5 # build noarch packages only for 7.0 version
6 %if 0%{?_pld_builder:1} && "%{?php_suffix}" != "70"
10 %define php_name php%{?php_suffix}
11 %define modname xdebug
12 Summary: %{modname} - provides functions for functions traces and profiling
13 Summary(pl.UTF-8): %{modname} - funkcje do śledzenia i profilowania funkcji
14 Name: %{php_name}-pecl-%{modname}
17 # The Xdebug License, version 1.01
18 # (Based on "The PHP License", version 3.0)
20 Group: Development/Languages/PHP
21 Source0: https://xdebug.org/files/xdebug-%{version}.tgz
22 # Source0-md5: 35cc0f2e8b7d40556a9ad9afd9c49aee
23 Source1: %{modname}.ini
24 Source2: vim-xt-filetype.vim
25 URL: https://xdebug.org/
26 BuildRequires: %{php_name}-devel >= 4:7.0
27 BuildRequires: libedit-devel
28 BuildRequires: libtool
29 BuildRequires: rpmbuild(macros) >= 1.650
30 %{?requires_zend_extension}
31 Provides: php(%{modname}) = %{version}
32 Obsoletes: php-pecl-xdebug < 2.2.4-1
33 Conflicts: ZendOptimizer
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _vimdatadir %{_datadir}/vim
39 The Xdebug extension helps you debugging your script by providing a
40 lot of valuable debug information. The debug information that Xdebug
41 can provide includes the following:
43 - stack and function traces in error messages with:
44 - full parameter display for user defined functions
45 - function name, file name and line indications
46 - support for member functions
48 - protection for infinite recursions
52 - profiling information for PHP scripts
53 - code coverage analysis
54 - capabilities to debug your scripts interactively with a debug client
56 %description -l pl.UTF-8
57 Rozszerzenie Xdebug pomaga przy odpluskwianiu skryptu dostarczając
58 dużo wartościowych informacji. Informacje przydatne do śledzenia,
59 które może zapewnić Xdebug, obejmują:
61 - śledzenie stosu i funkcji w komunikatach błędów wraz z:
62 - pełnym wyświetlaniem parametrów dla funkcji zdefiniowanych przez
64 - nazwami funkcji, nazwami plików i numerami linii
66 - przydzielanie pamięci
67 - zabezpieczenie przed nieskończoną rekurencją
69 Xdebug dostarcza także:
71 - informacje do profilowania skryptów PHP
72 - analizę wywołań skryptu
73 - możliwość śledzenia skryptów interaktywnie przy pomocy klienta
76 %package -n vim-syntax-xdebug
77 Summary: Vim syntax: Xdebug trace files
78 Group: Applications/Editors/Vim
79 Requires: php(%{modname}) = %{version}
80 Requires: vim-rt >= 4:7.2.170
83 %description -n vim-syntax-xdebug
84 This plugin provides syntax highlighting Xdebug trace files (context
89 mv %{modname}-%{version}*/* .
90 chmod +x debugclient/configure
92 %{__sed} -e 's#^;zend_extension.*#zend_extension=%{php_extensiondir}/%{modname}.so#' %{SOURCE1} > %{modname}.ini
94 install -d vim/{syntax,ftdetect}
95 mv contrib/xt.vim vim/syntax
96 cp -p %{SOURCE2} vim/ftdetect/xt.vim
99 # libtool 2.2 build fix
100 if [ -f %{_aclocaldir}/ltsugar.m4 ]; then
101 cat %{_aclocaldir}/ltsugar.m4 >> config.m4
102 cat %{_aclocaldir}/ltsugar.m4 >> debugclient/aclocal.m4
104 cat %{_aclocaldir}/ltversion.m4 >> config.m4
105 cat %{_aclocaldir}/ltversion.m4 >> debugclient/aclocal.m4
107 cat %{_aclocaldir}/lt~obsolete.m4 >> config.m4
108 cat %{_aclocaldir}/lt~obsolete.m4 >> debugclient/aclocal.m4
110 cat %{_aclocaldir}/ltoptions.m4 >> config.m4
111 cat %{_aclocaldir}/ltoptions.m4 >> debugclient/aclocal.m4
113 cat %{_aclocaldir}/libtool.m4 >> debugclient/aclocal.m4
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_bindir},%{php_sysconfdir}/conf.d,%{php_extensiondir}}
127 install -p debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}/%{modname}%{?php_suffix}-debugclient
128 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
129 cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
133 install -d $RPM_BUILD_ROOT%{_vimdatadir}
134 cp -a vim/* $RPM_BUILD_ROOT%{_vimdatadir}
138 rm -rf $RPM_BUILD_ROOT
141 %php_webserver_restart
144 if [ "$1" = 0 ]; then
145 %php_webserver_restart
149 %defattr(644,root,root,755)
150 %doc README.rst CREDITS contrib
151 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
152 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
153 %attr(755,root,root) %{_bindir}/xdebug*-debugclient
156 %files -n vim-syntax-xdebug
157 %defattr(644,root,root,755)
158 %{_vimdatadir}/ftdetect/xt.vim
159 %{_vimdatadir}/syntax/xt.vim