[php-pecl-runkit] Fix FBFS on Fedora 16(17 rawhide) and rpm 4.9 - bz#715709

Pavel Alexeev hubbitus at fedoraproject.org
Mon Sep 12 18:37:19 UTC 2011


commit 36c19a4d559a44f5898300ab59356ecf6e314693
Author: Pavel Alexeev (aka Pahan-Hubbitus) <pahan at hubbitus.info>
Date:   Mon Sep 12 22:37:05 2011 +0400

    Fix FBFS on Fedora 16(17 rawhide) and rpm 4.9 - bz#715709

 php-pecl-runkit.spec |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)
---
diff --git a/php-pecl-runkit.spec b/php-pecl-runkit.spec
index 91c6f41..5666f59 100644
--- a/php-pecl-runkit.spec
+++ b/php-pecl-runkit.spec
@@ -1,17 +1,17 @@
-%global	php_apiver  %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
-%{!?__pecl:		%{expand:	%%global __pecl	%{_bindir}/pecl}}
-%{!?php_extdir:	%{expand:	%%global php_extdir	%(php-config --extension-dir)}}
+%global	php_apiver	%((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
+%{!?__pecl:			%{expand:	%%global __pecl	%{_bindir}/pecl}}
+%{!?php_extdir:		%{expand:	%%global php_extdir	%(php-config --extension-dir &>/dev/null)}}
 
-%define	CVS	20090215
+%global		CVS	20090215
 
-%define		peclName	runkit
+%global		peclName	runkit
 
 Summary:		Mangle with user defined functions and classes
 Summary(ru):	Манипулирование пользовательскими функциями и классами
 Summary(pl):	Obróbka zdefiniowanych przez użytkownika funkcji i klas
 Name:		php-pecl-%{peclName}
 Version:		0.9
-Release:		13%{?CVS:.CVS%{CVS}}%{?dist}
+Release:		14%{?CVS:.CVS%{CVS}}%{?dist}
 License:		PHP
 Group:		Development/Libraries
 %if 0%{?CVS:1}
@@ -22,10 +22,15 @@ Source0:		http://pecl.php.net/get/%{peclName}-%{version}.tgz
 %endif
 # Source0-md5:	05a690f04b7d2c42193f3e0c1bb99a19
 URL:			http://pecl.php.net/package/runkit/
-BuildRequires: php-pear, php-devel
+BuildRequires:	php-pear >= 1:1.4.9-1.2
+BuildRequires:	php-devel >= 5.1.0, php-cli
+%if 0%{?pecl_install:1}
 Requires(post):	%{__pecl}
+%endif
+%if 0%{?pecl_uninstall:1}
 Requires(postun):	%{__pecl}
-%if %{?php_zend_api}0
+%endif
+%if %{?php_zend_api:1}0
 Requires:		php(zend-abi) = %{php_zend_api}
 Requires:		php(api) = %{php_core_api}
 %else
@@ -38,6 +43,12 @@ Patch0:		php-pecl-runkit-0.9-ZVAL_REFCOUNT.patch
 Patch1:		php-pecl-runkit-0.9-ZVAL_ADDREF.patch
 Patch3:		php-pecl-runkit-0.9.Z_NEW_REFCOUNT.patch
 
+# 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
 Replace, rename, and remove user defined functions and classes. Define
 customized superglobal variables for general purpose use. Execute code
@@ -60,7 +71,7 @@ ogólnego użytku. Wykonywanie danego kodu w ograniczonym środowisku
 cd %{peclName}
 
 # Patch set intended only for PHP version greater than 5.3.0
-%if %( php -r 'echo version_compare(PHP_VERSION, "5.3.0", ">=") ? 1 : 0;' )
+%if %( php -r "echo (version_compare(PHP_VERSION, '5.3.0', '>=') ? 1 : 0);" 2>/dev/null || echo 0 )
 %patch0 -p2 -b .zrefcount
 %patch1 -p2 -b .zaddref
 %patch3 -p2 -b .new_refcount
@@ -69,9 +80,8 @@ cd %{peclName}
 %build
 cd %{peclName}
 phpize
-#*Hu0 %configure
 %configure --enable-%{peclName} --with-%{peclName}
-%{__make}
+make
 
 %install
 cd %{peclName}
@@ -113,6 +123,9 @@ rm -rf %{buildroot}
 %attr(755,root,root) %{php_extdir}/%{peclName}.so
 
 %changelog
+* Tue Aug 2 2011 Pavel Alexeev <Pahan at Hubbitus.info> - 0.9-14.CVS20090215
+- Fix FBFS on Fedora 16(17 rawhide) and rpm 4.9 - bz#715709
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9-13.CVS20090215
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list