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
13 Summary: %{modname} - provides functions for functions traces and profiling
14 Summary(pl.UTF-8): %{modname} - funkcje do śledzenia i profilowania funkcji
15 Name: %{php_name}-pecl-%{modname}
17 Release: 0.%{subver}.1
18 # The Xdebug License, version 1.01
19 # (Based on "The PHP License", version 3.0)
21 Group: Development/Languages/PHP
22 Source0: https://xdebug.org/files/xdebug-%{version}%{subver}.tgz
23 # Source0-md5: f0cc5d860ee9172b1cdacc384d8133ac
24 Source1: %{modname}.ini
25 Source2: vim-xt-filetype.vim
26 URL: https://xdebug.org/
27 BuildRequires: %{php_name}-devel >= 4:7.0
28 BuildRequires: libedit-devel
29 BuildRequires: libtool
30 BuildRequires: rpmbuild(macros) >= 1.650
31 %{?requires_zend_extension}
32 Provides: php(%{modname}) = %{version}
33 Obsoletes: php-pecl-xdebug < 2.2.4-1
34 Conflicts: ZendOptimizer
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _vimdatadir %{_datadir}/vim
40 The Xdebug extension helps you debugging your script by providing a
41 lot of valuable debug information. The debug information that Xdebug
42 can provide includes the following:
44 - stack and function traces in error messages with:
45 - full parameter display for user defined functions
46 - function name, file name and line indications
47 - support for member functions
49 - protection for infinite recursions
53 - profiling information for PHP scripts
54 - code coverage analysis
55 - capabilities to debug your scripts interactively with a debug client
57 %description -l pl.UTF-8
58 Rozszerzenie Xdebug pomaga przy odpluskwianiu skryptu dostarczając
59 dużo wartościowych informacji. Informacje przydatne do śledzenia,
60 które może zapewnić Xdebug, obejmują:
62 - śledzenie stosu i funkcji w komunikatach błędów wraz z:
63 - pełnym wyświetlaniem parametrów dla funkcji zdefiniowanych przez
65 - nazwami funkcji, nazwami plików i numerami linii
67 - przydzielanie pamięci
68 - zabezpieczenie przed nieskończoną rekurencją
70 Xdebug dostarcza także:
72 - informacje do profilowania skryptów PHP
73 - analizę wywołań skryptu
74 - możliwość śledzenia skryptów interaktywnie przy pomocy klienta
77 %package -n vim-syntax-xdebug
78 Summary: Vim syntax: Xdebug trace files
79 Group: Applications/Editors/Vim
80 Requires: php(%{modname}) = %{version}
81 Requires: vim-rt >= 4:7.2.170
84 %description -n vim-syntax-xdebug
85 This plugin provides syntax highlighting Xdebug trace files (context
90 mv %{modname}-%{version}*/* .
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
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_bindir},%{php_sysconfdir}/conf.d,%{php_extensiondir}}
111 install -p debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}/%{modname}%{?php_suffix}-debugclient
112 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
113 cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
117 install -d $RPM_BUILD_ROOT%{_vimdatadir}
118 cp -a vim/* $RPM_BUILD_ROOT%{_vimdatadir}
122 rm -rf $RPM_BUILD_ROOT
125 %php_webserver_restart
128 if [ "$1" = 0 ]; then
129 %php_webserver_restart
133 %defattr(644,root,root,755)
134 %doc README.rst CREDITS contrib
135 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
136 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
137 %attr(755,root,root) %{_bindir}/xdebug*-debugclient
140 %files -n vim-syntax-xdebug
141 %defattr(644,root,root,755)
142 %{_vimdatadir}/ftdetect/xt.vim
143 %{_vimdatadir}/syntax/xt.vim