rpms/php-eaccelerator/EL-5 php-eaccelerator.spec,1.28,1.29

Matthias Saou (thias) fedora-extras-commits at redhat.com
Mon Dec 17 21:40:49 UTC 2007


Author: thias

Update of /cvs/extras/rpms/php-eaccelerator/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29821/EL-5

Modified Files:
	php-eaccelerator.spec 
Log Message:
Add proper "ifs" to get PHP requirements right on EL4 and EL5 (#417221).



Index: php-eaccelerator.spec
===================================================================
RCS file: /cvs/extras/rpms/php-eaccelerator/EL-5/php-eaccelerator.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- php-eaccelerator.spec	26 Nov 2007 12:12:31 -0000	1.28
+++ php-eaccelerator.spec	17 Dec 2007 21:40:09 -0000	1.29
@@ -1,4 +1,6 @@
-%global php_extdir  %(php-config --extension-dir 2>/dev/null || echo "undefined")
+%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined")
+%global php_zendabiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP Extension => //p') | tail -1)
+%global php_version %((echo 0; php-config --version 2>/dev/null) | tail -1)
 
 # This is the apache userid, only used for sysvipc semaphores which is the
 # default on ppc since spinlock is not detected (not supported?)
@@ -7,7 +9,7 @@
 Summary: PHP accelerator, optimizer, encoder and dynamic content cacher
 Name: php-eaccelerator
 Version: 0.9.5.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 # The eaccelerator module itself is GPLv2+
 # The PHP control panel is under the Zend license (control.php and dasm.php)
@@ -18,8 +20,19 @@
 Patch0: eaccelerator-0.9.5-rc1-config.patch
 Patch1: eaccelerator-0.9.5.1-nophpversioncheck.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+%if %{?php_zend_api}0
+# Require clean ABI/API versions if available (Fedora)
 Requires: php(zend-abi) = %{php_zend_api}
 Requires: php(api) = %{php_core_api}
+%else
+%if "%{rhel}" == "5"
+# RHEL5 where we have php-common providing the Zend ABI the "old way"
+Requires: php-zend-abi = %{php_zendabiver}
+%else
+# RHEL4 where we have no php-common and nothing providing the Zend ABI...
+Requires: php = %{php_version}
+%endif
+%endif
 Provides: php-zend_extension
 Conflicts: php-mmcache
 BuildRequires: php, php-devel
@@ -87,6 +100,9 @@
 
 
 %changelog
+* Mon Nov 26 2007 Matthias Saou <http://freshrpms.net/> 1:0.9.5.2-2
+- Add proper "ifs" to get PHP requirements right on EL4 and EL5 (#417221).
+
 * Mon Nov 26 2007 Matthias Saou <http://freshrpms.net/> 1:0.9.5.2-1
 - Update to 0.9.5.2.
 




More information about the scm-commits mailing list