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