]> git.pld-linux.org Git - packages/php-pecl-xdebug.git/blob - php-pecl-xdebug.spec
69d5d8ff817cda26164a3cd5c75b2dc84fc4e8dc
[packages/php-pecl-xdebug.git] / php-pecl-xdebug.spec
1 #
2 # Conditional build:
3 %bcond_without  vim             # make vim syntax package
4
5 # build noarch packages only for 7.0 version
6 %if 0%{?_pld_builder:1} && "%{?php_suffix}" != "70"
7 %undefine       with_vim
8 %endif
9
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}
15 # https://xdebug.org/docs/compat#versions
16 Version:        3.0.1
17 Release:        1
18 # The Xdebug License, version 1.01
19 # (Based on "The PHP License", version 3.0)
20 License:        PHP
21 Group:          Development/Languages/PHP
22 Source0:        https://xdebug.org/files/xdebug-%{version}.tgz
23 # Source0-md5:  52891d89de6829fa8dba1132b8c66f75
24 Source1:        %{modname}.ini
25 Source2:        vim-xt-filetype.vim
26 URL:            https://xdebug.org/
27 # Need a PHP version >= 7.2.0 and < 8.2.0
28 BuildRequires:  %{php_name}-devel >= 4:7.2.0
29 BuildRequires:  %{php_name}-devel < 4:8.2.0
30 BuildRequires:  libedit-devel
31 BuildRequires:  libtool
32 BuildRequires:  rpmbuild(macros) >= 1.650
33 %{?requires_zend_extension}
34 Provides:       php(%{modname}) = %{version}
35 Obsoletes:      php-pecl-xdebug < 2.2.4-1
36 Conflicts:      ZendOptimizer
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _vimdatadir             %{_datadir}/vim
40
41 %description
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:
45
46 - stack and function traces in error messages with:
47  - full parameter display for user defined functions
48  - function name, file name and line indications
49  - support for member functions
50 - memory allocation
51 - protection for infinite recursions
52
53 Xdebug also provides:
54
55 - profiling information for PHP scripts
56 - code coverage analysis
57 - capabilities to debug your scripts interactively with a debug client
58
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ą:
63
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ą
71
72 Xdebug dostarcza także:
73
74 - informacje do profilowania skryptów PHP
75 - analizę wywołań skryptu
76 - możliwość śledzenia skryptów interaktywnie przy pomocy klienta
77   odpluskwiacza
78
79 %package -n vim-syntax-xdebug
80 Summary:        Vim syntax: Xdebug trace files
81 Group:          Applications/Editors/Vim
82 Requires:       vim-rt >= 4:7.2.170
83 BuildArch:      noarch
84
85 %description -n vim-syntax-xdebug
86 This plugin provides syntax highlighting Xdebug trace files (context
87 or unified).
88
89 %prep
90 %setup -qc
91 mv %{modname}-*/* .
92
93 %{__sed} -e 's#^;zend_extension.*#zend_extension=%{php_extensiondir}/%{modname}.so#' %{SOURCE1} > %{modname}.ini
94
95 install -d vim/{syntax,ftdetect}
96 mv contrib/xt.vim vim/syntax
97 cp -p %{SOURCE2} vim/ftdetect/xt.vim
98
99 %build
100 phpize
101 %configure
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT{%{_bindir},%{php_sysconfdir}/conf.d,%{php_extensiondir}}
107
108 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
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
115
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
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post
126 %php_webserver_restart
127
128 %postun
129 if [ "$1" = 0 ]; then
130         %php_webserver_restart
131 fi
132
133 %files
134 %defattr(644,root,root,755)
135 %doc README.rst CREDITS contrib
136 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/*%{modname}.ini
137 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
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
This page took 0.0651 seconds and 2 git commands to generate.