[php-pecl-xdebug] avoid private-shared-object-provides xdebug.so, add %%check, use libedit for EPEL
Remi Collet
remi at fedoraproject.org
Sat Oct 23 16:06:19 UTC 2010
commit 7501334015705d37f8acbfb0a3958fe658728339
Author: remi <fedora at famillecollet.com>
Date: Sat Oct 23 18:06:11 2010 +0200
avoid private-shared-object-provides xdebug.so, add %%check, use libedit for EPEL
php-pecl-xdebug.spec | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
---
diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec
index 0fc7394..a9824ac 100644
--- a/php-pecl-xdebug.spec
+++ b/php-pecl-xdebug.spec
@@ -6,7 +6,7 @@
Name: php-pecl-xdebug
Version: 2.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: PECL package for debugging PHP scripts
License: BSD
@@ -16,16 +16,14 @@ Source0: http://pecl.php.net/get/xdebug-%{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: 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}
%if 0%{?php_zend_api}
@@ -35,6 +33,13 @@ Requires: php(api) = %{php_core_api}
Requires: php-api = %{php_apiver}
%endif
+
+%{?filter_setup:
+%filter_provides_in %{php_extdir}/.*\.so$
+%filter_setup
+}
+
+
%description
The Xdebug extension helps you debugging your script by providing a lot
of valuable debug information.
@@ -42,9 +47,9 @@ of valuable debug information.
%prep
%setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
cd xdebug-%{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
@@ -60,7 +65,7 @@ phpize
# Build debugclient
pushd debugclient
#cp %{_datadir}/automake-1.??/depcomp .
-%configure %{config_flags}
+%configure --with-libedit
%{__make} %{?_smp_mflags}
popd
@@ -90,6 +95,15 @@ 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/xdebug.so \
+ --modules | grep Xdebug
+
+
%if 0%{?pecl_install:1}
%post
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
@@ -118,6 +132,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Oct 23 2010 Remi Collet <Fedora at FamilleCollet.com> - 2.1.0-2
+- 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
More information about the scm-commits
mailing list