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