SPECS: php4.spec - hardcode API versions into spec. reliable and w...
glen
glen at pld-linux.org
Fri Sep 16 04:12:47 CEST 2005
Author: glen Date: Fri Sep 16 02:12:47 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- hardcode API versions into spec. reliable and works. rel 8
---- Files affected:
SPECS:
php4.spec (1.475 -> 1.476)
---- Diffs:
================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.475 SPECS/php4.spec:1.476
--- SPECS/php4.spec:1.475 Tue Sep 13 22:42:03 2005
+++ SPECS/php4.spec Fri Sep 16 04:12:42 2005
@@ -74,7 +74,7 @@
Summary(uk): PHP ÷ĹŇÓŚ§ 4 - ÍĎ×Á ĐŇĹĐŇĎĂĹÓŐ×ÁÎÎŃ HTML-ĆÁĘĚŚ×, ×ÉËĎÎŐ×ÁÎÁ ÎÁ ÓĹŇ×ĹŇŚ
Name: php4
Version: 4.4.0
-Release: 7%{?with_hardening:hardened}
+Release: 8%{?with_hardening:hardened}
Epoch: 3
Group: Libraries
License: PHP
@@ -189,7 +189,7 @@
%{?with_recode:BuildRequires: recode-devel >= 3.5d-3}
BuildRequires: rpm-build >= 4.4.0
BuildRequires: rpm-php-pearprov >= 4.0.2-100
-BuildRequires: rpmbuild(macros) >= 1.238
+BuildRequires: rpmbuild(macros) >= 1.236
%{?with_xslt:BuildRequires: sablotron-devel >= 0.96}
BuildRequires: sed >= 4.0
BuildRequires: t1lib-devel
@@ -214,8 +214,10 @@
%define _phpsharedir %{_datadir}/php
%define extensionsdir %{_libdir}/php4
-# redefine to use versions from current source
-%define __php_includedir %{_builddir}/php-%{version}
+# must be in sync with source. extra check ensuring that it is so is done in %%build
+%define php_api_version 20020918
+%define zend_module_api 20020429
+%define zend_extension_api 20050606
%description
PHP is an HTML-embedded scripting language. PHP attempts to make it
@@ -1587,7 +1589,6 @@
Moduł PHP umożliwiający używanie kompresji zlib.
%prep
-# IMPORTANT: if you change '%setup', you should change %php_sourcedir macro earlier in this file
%setup -q -n php-%{version}
%patch0 -p1
%patch1 -p1
@@ -1641,6 +1642,21 @@
sed -i -e 's#apu-config#apu-1-config#g' sapi/apache*/*.m4
%build
+if API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h) && [ $API != %{php_api_version} ]; then
+ echo "Set %%define php_api_version to $API and rerun."
+ exit 1
+fi
+
+if API=$(awk '/#define ZEND_MODULE_API_NO/{print $3}' Zend/zend_modules.h) && [ $API != %{zend_module_api} ]; then
+ echo "Set %%define zend_module_api to $API and rerun."
+ exit 1
+fi
+
+if API=$(awk '/#define ZEND_EXTENSION_API_NO/{print $3}' Zend/zend_extensions.h) && [ $API != %{zend_extension_api} ]; then
+ echo "Set %%define zend_module_api to $API and rerun."
+ exit 1
+fi
+
CFLAGS="%{rpmcflags} -DEAPI=1 -I/usr/X11R6/include"
%if %{with apache2}
# Apache2 CFLAGS. harmless for other SAPIs.
@@ -3104,6 +3120,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.476 2005/09/16 02:12:42 glen
+- hardcode API versions into spec. reliable and works. rel 8
+
Revision 1.475 2005/09/13 20:42:03 glen
- add php/zend module api version provides
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/php4.spec?r1=1.475&r2=1.476&f=u
More information about the pld-cvs-commit
mailing list