[php-pecl-xdebug/f14] update to 2.1.2
Remi Collet
remi at fedoraproject.org
Thu Jul 28 19:29:09 UTC 2011
commit d15b1ca71e87f1d64d25fd4cc77a6fdad1f7c8e2
Author: remi <fedora at famillecollet.com>
Date: Thu Jul 28 21:28:53 2011 +0200
update to 2.1.2
.gitignore | 4 +-
php-pecl-xdebug.spec | 99 ++++++++++++++++++++++++++++++++++++--------------
sources | 2 +-
3 files changed, 74 insertions(+), 31 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 61cdc04..f9b64b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-xdebug-2.0.5.tgz
-xdebug-2.1.0.tgz
+*~
+/xdebug-2.1.2.tgz
diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec
index 0fc7394..1b3faaa 100644
--- a/php-pecl-xdebug.spec
+++ b/php-pecl-xdebug.spec
@@ -2,72 +2,99 @@
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
-%define pecl_name xdebug
+%global pecl_name xdebug
Name: php-pecl-xdebug
-Version: 2.1.0
+Version: 2.1.2
Release: 1%{?dist}
Summary: PECL package for debugging PHP scripts
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/xdebug
-Source0: http://pecl.php.net/get/xdebug-%{version}.tgz
+Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: automake php-devel php-pear >= 1:1.4.9-1.2
-
-%if 0%{?fedora}
-%define config_flags --with-libedit
+BuildRequires: php-pear >= 1:1.4.9-1.2
+BuildRequires: php-devel >= 5.1.0
BuildRequires: libedit-devel
-%else
-%define config_flags --without-libedit
-%endif
+%if 0%{?pecl_install:1}
Requires(post): %{__pecl}
+%endif
+%if 0%{?pecl_uninstall:1}
Requires(postun): %{__pecl}
+%endif
Provides: php-pecl(Xdebug) = %{version}
+Provides: php-pecl(Xdebug)%{?_isa} = %{version}
-%if 0%{?php_zend_api}
+%if 0%{?php_zend_api:1}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
%else
Requires: php-api = %{php_apiver}
%endif
+
+# RPM 4.8
+%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
+%{?filter_setup}
+# RPM 4.9
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
+
+
%description
-The Xdebug extension helps you debugging your script by providing a lot
-of valuable debug information.
+The Xdebug extension helps you debugging your script by providing a lot of
+valuable debug information. The debug information that Xdebug can provide
+includes the following:
+
+* stack and function traces in error messages with:
+ o full parameter display for user defined functions
+ o function name, file name and line indications
+ o support for member functions
+* memory allocation
+* protection for infinite recursions
+
+Xdebug also provides:
+
+* profiling information for PHP scripts
+* code coverage analysis
+* capabilities to debug your scripts interactively with a debug client
%prep
%setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
-cd xdebug-%{version}
+cd %{pecl_name}-%{version}
+# package.xml is V1, package2.xml is V2
+mv ../package2.xml %{pecl_name}.xml
# fix rpmlint warnings
iconv -f iso8859-1 -t utf-8 Changelog > Changelog.conv && mv -f Changelog.conv Changelog
chmod -x *.[ch]
+# Check extension version
+ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h)
+if test "$ver" != "%{version}"; then
+ : Error: Upstream XDEBUG_VERSION version is ${ver}, expecting %{version}.
+ exit 1
+fi
%build
-cd xdebug-%{version}
+cd %{pecl_name}-%{version}
phpize
%configure --enable-xdebug
%{__make} %{?_smp_mflags}
# Build debugclient
pushd debugclient
-#cp %{_datadir}/automake-1.??/depcomp .
-%configure %{config_flags}
+%configure --with-libedit
%{__make} %{?_smp_mflags}
popd
%install
-cd xdebug-%{version}
-rm -rf $RPM_BUILD_ROOT
+cd %{pecl_name}-%{version}
+rm -rf $RPM_BUILD_ROOT docs
make install INSTALL_ROOT=$RPM_BUILD_ROOT
# install debugclient
@@ -76,20 +103,29 @@ install -pm 755 debugclient/debugclient $RPM_BUILD_ROOT%{_bindir}
# install config file
install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/xdebug.ini << 'EOF'
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF'
; Enable xdebug extension module
-zend_extension=%{php_extdir}/xdebug.so
+zend_extension=%{php_extdir}/%{pecl_name}.so
EOF
# install doc files
-install -d docs
-install -pm 644 Changelog CREDITS LICENSE NEWS README docs
+install -d ../docs
+install -pm 644 Changelog CREDITS LICENSE NEWS README ../docs
# Install XML package description
install -d $RPM_BUILD_ROOT%{pecl_xmldir}
install -pm 644 %{pecl_name}.xml $RPM_BUILD_ROOT%{pecl_xmldir}/%{name}.xml
+%check
+cd %{pecl_name}-%{version}
+# only check if build extension can be loaded
+%{_bindir}/php \
+ --no-php-ini \
+ --define zend_extension=modules/%{pecl_name}.so \
+ --modules | grep Xdebug
+
+
%if 0%{?pecl_install:1}
%post
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
@@ -110,14 +146,21 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%doc xdebug-%{version}/docs/*
-%config(noreplace) %{_sysconfdir}/php.d/xdebug.ini
-%{php_extdir}/xdebug.so
+%doc docs/*
+%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini
+%{php_extdir}/%{pecl_name}.so
%{_bindir}/debugclient
%{pecl_xmldir}/%{name}.xml
%changelog
+* Thu Jul 28 2011 Remi Collet <Fedora at FamilleCollet.com> - 2.1.2-1
+- update to 2.1.2
+- improved description
+- add filter_provides to avoid private-shared-object-provides xdebug.so
+- add %%check section (minimal load test)
+- always use libedit
+
* Tue Jun 29 2010 Remi Collet <Fedora at FamilleCollet.com> - 2.1.0-1
- update to 2.1.0
diff --git a/sources b/sources
index 6d07211..edf1374 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1a3cf373350cf852f99a7b044830973f xdebug-2.1.0.tgz
+3a9c3402063c8163de6e419ddc8d96e7 xdebug-2.1.2.tgz
More information about the scm-commits
mailing list