]> git.pld-linux.org Git - packages/php-pecl-xdebug.git/blobdiff - php-pecl-xdebug.spec
up to 2.6.1 [2018-08-01]
[packages/php-pecl-xdebug.git] / php-pecl-xdebug.spec
index 909faa7844b9db36e8c65c6e9f0f523a97f92e2e..f3bbf16b61d5381c38bbbf5097868ab0123b678e 100644 (file)
@@ -1,28 +1,40 @@
-%define                _modname        xdebug
-%define                _status         stable
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
-Summary:       %{_modname} - provides functions for functions traces and profiling
-Summary(pl.UTF-8):     %{_modname} - funkcje do śledzenia i profilowania funkcji
-Name:          php-pecl-%{_modname}
-Version:       2.0.3
-Release:       2
-License:       BSD style
+#
+# Conditional build:
+%bcond_without vim             # make vim syntax package
+
+# build noarch packages only for 7.0 version
+%if 0%{?_pld_builder:1} && "%{?php_suffix}" != "70"
+%undefine      with_vim
+%endif
+
+%define                php_name        php%{?php_suffix}
+%define                modname xdebug
+Summary:       %{modname} - provides functions for functions traces and profiling
+Summary(pl.UTF-8):     %{modname} - funkcje do śledzenia i profilowania funkcji
+Name:          %{php_name}-pecl-%{modname}
+Version:       2.6.1
+Release:       1
+# The Xdebug License, version 1.01
+# (Based on "The PHP License", version 3.0)
+License:       PHP
 Group:         Development/Languages/PHP
-Source0:       http://pecl.php.net/get/%{_modname}-%{version}.tgz
-# Source0-md5: 0735584168c8c9f111252128d0076d7c
-Source1:       %{name}.ini
-URL:           http://pecl.php.net/package/xdebug/
+Source0:       https://xdebug.org/files/xdebug-%{version}.tgz
+# Source0-md5: 35cc0f2e8b7d40556a9ad9afd9c49aee
+Source1:       %{modname}.ini
+Source2:       vim-xt-filetype.vim
+URL:           https://xdebug.org/
+BuildRequires: %{php_name}-devel >= 4:7.0
 BuildRequires: libedit-devel
-BuildRequires: libtool >= 2:2.2
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.344
-Requires:      %{_sysconfdir}/conf.d
+BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.650
 %{?requires_zend_extension}
+Provides:      php(%{modname}) = %{version}
+Obsoletes:     php-pecl-xdebug < 2.2.4-1
 Conflicts:     ZendOptimizer
-Obsoletes:     php-pear-%{_modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _vimdatadir             %{_datadir}/vim
+
 %description
 The Xdebug extension helps you debugging your script by providing a
 lot of valuable debug information. The debug information that Xdebug
@@ -31,17 +43,16 @@ can provide includes the following:
 - stack and function traces in error messages with:
  - full parameter display for user defined functions
  - function name, file name and line indications
- - support for member functions memory allocation
+ - support for member functions
+- memory allocation
 - protection for infinite recursions
 
 Xdebug also provides:
 
 - profiling information for PHP scripts
-- script execution analysis
+- code coverage analysis
 - capabilities to debug your scripts interactively with a debug client
 
-In PECL status of this package is: %{_status}.
-
 %description -l pl.UTF-8
 Rozszerzenie Xdebug pomaga przy odpluskwianiu skryptu dostarczając
 dużo wartościowych informacji. Informacje przydatne do śledzenia,
@@ -62,53 +73,66 @@ Xdebug dostarcza także:
 - możliwość śledzenia skryptów interaktywnie przy pomocy klienta
   odpluskwiacza
 
-To rozszerzenie ma w PECL status: %{_status}.
+%package -n vim-syntax-xdebug
+Summary:       Vim syntax: Xdebug trace files
+Group:         Applications/Editors/Vim
+Requires:      php(%{modname}) = %{version}
+Requires:      vim-rt >= 4:7.2.170
+BuildArch:     noarch
+
+%description -n vim-syntax-xdebug
+This plugin provides syntax highlighting Xdebug trace files (context
+or unified).
 
 %prep
-%setup -q -c
-chmod +x %{_modname}-%{version}/debugclient/configure
-cp %{SOURCE1} %{_modname}.ini
-sed -e 's#^;zend_extension.*#zend_extension%{?zend_zts:_ts}=%{extensionsdir}/%{_modname}.so#' -i %{_modname}.ini
+%setup -qc
+mv %{modname}-%{version}*/* .
+chmod +x debugclient/configure
 
-%build
-cd %{_modname}-%{version}
+%{__sed} -e 's#^;zend_extension.*#zend_extension=%{php_extensiondir}/%{modname}.so#' %{SOURCE1} > %{modname}.ini
 
+install -d vim/{syntax,ftdetect}
+mv contrib/xt.vim vim/syntax
+cp -p %{SOURCE2} vim/ftdetect/xt.vim
+
+%build
 # libtool 2.2 build fix
-if [ -f /usr/share/aclocal/ltsugar.m4 ]; then
-       cat /usr/share/aclocal/ltsugar.m4 >> config.m4
-       cat /usr/share/aclocal/ltsugar.m4 >> debugclient/aclocal.m4
-                                                                                                                                                                                                                                                                                                                                                                       
-       cat /usr/share/aclocal/ltversion.m4 >> config.m4
-       cat /usr/share/aclocal/ltversion.m4 >> debugclient/aclocal.m4
-                                                                                                                                                                                                                                                                                                                                                                       
-       cat /usr/share/aclocal/lt~obsolete.m4 >> config.m4
-       cat /usr/share/aclocal/lt~obsolete.m4 >> debugclient/aclocal.m4
-                                                                                                                                                                                                                                                                                                                                                                       
-       cat /usr/share/aclocal/ltoptions.m4 >> config.m4
-       cat /usr/share/aclocal/ltoptions.m4 >> debugclient/aclocal.m4
-                                                                                                                                                                                                                                                                                                                                                                       
-       cat /usr/share/aclocal/libtool.m4 >> debugclient/aclocal.m4
-fi
+if [ -f %{_aclocaldir}/ltsugar.m4 ]; then
+       cat %{_aclocaldir}/ltsugar.m4 >> config.m4
+       cat %{_aclocaldir}/ltsugar.m4 >> debugclient/aclocal.m4
 
+       cat %{_aclocaldir}/ltversion.m4 >> config.m4
+       cat %{_aclocaldir}/ltversion.m4 >> debugclient/aclocal.m4
+
+       cat %{_aclocaldir}/lt~obsolete.m4 >> config.m4
+       cat %{_aclocaldir}/lt~obsolete.m4 >> debugclient/aclocal.m4
+
+       cat %{_aclocaldir}/ltoptions.m4 >> config.m4
+       cat %{_aclocaldir}/ltoptions.m4 >> debugclient/aclocal.m4
+
+       cat %{_aclocaldir}/libtool.m4 >> debugclient/aclocal.m4
+fi
 phpize
 %configure
 %{__make}
 cd debugclient
-install /usr/share/automake/{config.*,depcomp} .
-%{__libtoolize} --install
-%{__aclocal}
-%{__autoconf}
 %configure \
        --with-libedit
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/conf.d,%{extensionsdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{php_sysconfdir}/conf.d,%{php_extensiondir}}
 
-install %{_modname}-*/debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}/%{_modname}-debugclient
-install %{_modname}-*/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
-install %{_modname}.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
+install -p debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}/%{modname}%{?php_suffix}-debugclient
+install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+
+%if %{with vim}
+# vim syntax
+install -d $RPM_BUILD_ROOT%{_vimdatadir}
+cp -a vim/* $RPM_BUILD_ROOT%{_vimdatadir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -123,7 +147,14 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc %{_modname}-*/{README,NEWS,Changelog,CREDITS,xt.vim}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{extensionsdir}/%{_modname}.so
-%attr(755,root,root) %{_bindir}/*
+%doc README.rst CREDITS contrib
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
+%attr(755,root,root) %{_bindir}/xdebug*-debugclient
+
+%if %{with vim}
+%files -n vim-syntax-xdebug
+%defattr(644,root,root,755)
+%{_vimdatadir}/ftdetect/xt.vim
+%{_vimdatadir}/syntax/xt.vim
+%endif
This page took 0.061442 seconds and 4 git commands to generate.