]>
Commit | Line | Data |
---|---|---|
3dda0a07 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without vim # make vim syntax package | |
4 | ||
16fe691e ER |
5 | # build noarch packages only for 7.0 version |
6 | %if 0%{?_pld_builder:1} && "%{?php_suffix}" != "70" | |
bcd8bd1a | 7 | %undefine with_vim |
3dda0a07 ER |
8 | %endif |
9 | ||
d412cdf0 | 10 | %define php_name php%{?php_suffix} |
266b1c9d | 11 | %define modname xdebug |
266b1c9d ER |
12 | Summary: %{modname} - provides functions for functions traces and profiling |
13 | Summary(pl.UTF-8): %{modname} - funkcje do śledzenia i profilowania funkcji | |
05ed2ac4 | 14 | Name: %{php_name}-pecl-%{modname} |
d366285a | 15 | # https://xdebug.org/docs/compat#versions |
19300cd0 | 16 | Version: 3.2.0 |
08fc50cc | 17 | Release: 1 |
fe451dff ER |
18 | # The Xdebug License, version 1.01 |
19 | # (Based on "The PHP License", version 3.0) | |
20 | License: PHP | |
d6c5cc9f | 21 | Group: Development/Languages/PHP |
08fc50cc ER |
22 | Source0: https://xdebug.org/files/xdebug-%{version}.tgz |
23 | # Source0-md5: 2884c58679f8a41d08beb42abc156c22 | |
05ed2ac4 | 24 | Source1: %{modname}.ini |
3dda0a07 | 25 | Source2: vim-xt-filetype.vim |
3ea10353 | 26 | URL: https://xdebug.org/ |
19300cd0 ER |
27 | # Need a PHP version >= 8.0.0 and < 8.3.0 |
28 | BuildRequires: %{php_name}-devel >= 4:8.0.0 | |
29 | BuildRequires: %{php_name}-devel < 4:8.3.0 | |
e8a9b5ad | 30 | BuildRequires: libedit-devel |
aba255b5 | 31 | BuildRequires: libtool |
8096f627 | 32 | BuildRequires: rpmbuild(macros) >= 1.650 |
3464b421 | 33 | %{?requires_zend_extension} |
5423a009 | 34 | Provides: php(%{modname}) = %{version} |
b8ab7bee | 35 | Obsoletes: php-pecl-xdebug < 2.2.4-1 |
022c051a | 36 | Conflicts: ZendOptimizer |
d6c5cc9f AG |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
3dda0a07 ER |
39 | %define _vimdatadir %{_datadir}/vim |
40 | ||
d6c5cc9f | 41 | %description |
cc7edbad JB |
42 | The Xdebug extension helps you debugging your script by providing a |
43 | lot of valuable debug information. The debug information that Xdebug | |
44 | can provide includes the following: | |
82a74d97 AG |
45 | |
46 | - stack and function traces in error messages with: | |
20519407 ER |
47 | - full parameter display for user defined functions |
48 | - function name, file name and line indications | |
fe451dff ER |
49 | - support for member functions |
50 | - memory allocation | |
82a74d97 AG |
51 | - protection for infinite recursions |
52 | ||
53 | Xdebug also provides: | |
d6c5cc9f | 54 | |
82a74d97 | 55 | - profiling information for PHP scripts |
fe451dff | 56 | - code coverage analysis |
82a74d97 | 57 | - capabilities to debug your scripts interactively with a debug client |
98b3abb8 | 58 | |
2c8c4667 JR |
59 | %description -l pl.UTF-8 |
60 | Rozszerzenie Xdebug pomaga przy odpluskwianiu skryptu dostarczając | |
61 | dużo wartościowych informacji. Informacje przydatne do śledzenia, | |
62 | które może zapewnić Xdebug, obejmują: | |
cc7edbad | 63 | |
2c8c4667 JR |
64 | - śledzenie stosu i funkcji w komunikatach błędów wraz z: |
65 | - pełnym wyświetlaniem parametrów dla funkcji zdefiniowanych przez | |
66 | użytkownika | |
67 | - nazwami funkcji, nazwami plików i numerami linii | |
68 | - obsługą metod klas | |
69 | - przydzielanie pamięci | |
70 | - zabezpieczenie przed nieskończoną rekurencją | |
cc7edbad | 71 | |
2c8c4667 | 72 | Xdebug dostarcza także: |
cc7edbad | 73 | |
2c8c4667 JR |
74 | - informacje do profilowania skryptów PHP |
75 | - analizę wywołań skryptu | |
76 | - możliwość śledzenia skryptów interaktywnie przy pomocy klienta | |
cc7edbad JB |
77 | odpluskwiacza |
78 | ||
3dda0a07 ER |
79 | %package -n vim-syntax-xdebug |
80 | Summary: Vim syntax: Xdebug trace files | |
81 | Group: Applications/Editors/Vim | |
3dda0a07 | 82 | Requires: vim-rt >= 4:7.2.170 |
3dda0a07 | 83 | BuildArch: noarch |
3dda0a07 ER |
84 | |
85 | %description -n vim-syntax-xdebug | |
86 | This plugin provides syntax highlighting Xdebug trace files (context | |
87 | or unified). | |
88 | ||
d6c5cc9f | 89 | %prep |
266b1c9d | 90 | %setup -qc |
d366285a | 91 | mv %{modname}-*/* . |
d6c5cc9f | 92 | |
7c227a4b | 93 | %{__sed} -e 's#^;zend_extension.*#zend_extension=%{php_extensiondir}/%{modname}.so#' %{SOURCE1} > %{modname}.ini |
50d01b8c | 94 | |
3dda0a07 ER |
95 | install -d vim/{syntax,ftdetect} |
96 | mv contrib/xt.vim vim/syntax | |
97 | cp -p %{SOURCE2} vim/ftdetect/xt.vim | |
98 | ||
aba255b5 | 99 | %build |
d6c5cc9f AG |
100 | phpize |
101 | %configure | |
102 | %{__make} | |
103 | ||
104 | %install | |
105 | rm -rf $RPM_BUILD_ROOT | |
266b1c9d | 106 | install -d $RPM_BUILD_ROOT{%{_bindir},%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
d6c5cc9f | 107 | |
266b1c9d | 108 | install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
d366285a ER |
109 | %if "%php_major_version.%php_minor_version" >= "7.4" |
110 | # XDebug should be loaded after opcache | |
111 | cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/02_%{modname}.ini | |
112 | %else | |
113 | cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
114 | %endif | |
d6c5cc9f | 115 | |
3dda0a07 ER |
116 | %if %{with vim} |
117 | # vim syntax | |
118 | install -d $RPM_BUILD_ROOT%{_vimdatadir} | |
119 | cp -a vim/* $RPM_BUILD_ROOT%{_vimdatadir} | |
120 | %endif | |
121 | ||
d6c5cc9f AG |
122 | %clean |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %post | |
bc9b2fd3 | 126 | %php_webserver_restart |
d6c5cc9f | 127 | |
eb5447da AG |
128 | %postun |
129 | if [ "$1" = 0 ]; then | |
bc9b2fd3 | 130 | %php_webserver_restart |
d6c5cc9f AG |
131 | fi |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
18fda282 | 135 | %doc README.rst CREDITS contrib |
d366285a | 136 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/*%{modname}.ini |
266b1c9d | 137 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |
3dda0a07 ER |
138 | |
139 | %if %{with vim} | |
140 | %files -n vim-syntax-xdebug | |
141 | %defattr(644,root,root,755) | |
142 | %{_vimdatadir}/ftdetect/xt.vim | |
143 | %{_vimdatadir}/syntax/xt.vim | |
144 | %endif |