SPECS (DEVEL): php.spec - merged from HEAD, dropped php-pearprov

glen glen at pld-linux.org
Sun Oct 9 18:14:44 CEST 2005


Author: glen                         Date: Sun Oct  9 16:14:44 2005 GMT
Module: SPECS                         Tag: DEVEL
---- Log message:
- merged from HEAD, dropped php-pearprov

---- Files affected:
SPECS:
   php.spec (1.467.2.11 -> 1.467.2.12) 

---- Diffs:

================================================================
Index: SPECS/php.spec
diff -u SPECS/php.spec:1.467.2.11 SPECS/php.spec:1.467.2.12
--- SPECS/php.spec:1.467.2.11	Thu Sep 15 23:11:35 2005
+++ SPECS/php.spec	Sun Oct  9 18:14:38 2005
@@ -13,6 +13,7 @@
 # - make additional headers added by mail patch configurable
 # - apply -hardened patch by default ?
 # - ftp module needs to be linked with -lssl if openssl module is enabled
+# - modularize libxml, session, SimpleXML, SPL, standard (output from pure php -m)?
 # - shared pdo base
 #
 # Conditional build:
@@ -48,6 +49,7 @@
 %bcond_without	xmlrpc		# without XML-RPC extension module
 %bcond_without	apache1		# disable building apache 1.3.x module
 %bcond_without	apache2		# disable building apache 2.x module
+%bcond_without	fcgi		# disable building FCGI SAPI
 
 %define apxs1		/usr/sbin/apxs1
 %define	apxs2		/usr/sbin/apxs
@@ -66,7 +68,6 @@
 %undefine	with_msession
 %endif
 
-%include	/usr/lib/rpm/macros.php
 Summary:	The PHP HTML-embedded scripting language for use with Apache
 Summary(fr):	Le langage de script embarque-HTML PHP pour Apache
 Summary(pl):	Język skryptowy PHP - używany wraz z serwerem Apache
@@ -76,8 +77,8 @@
 Name:		php
 Version:	5.1.0
 %define	_rc	RC1
-%define	_rel 3
-Release:	0.%{_rc}.%{rel}%{?with_hardening:hardened}
+%define	_rel 3.1
+Release:	0.%{_rc}.%{_rel}%{?with_hardening:hardened}
 Epoch:		4
 Group:		Libraries
 License:	PHP
@@ -142,7 +143,7 @@
 BuildRequires:	expat-devel
 %endif
 %{?with_fdf:BuildRequires:	fdftk-devel}
-BuildRequires:	fcgi-devel
+%{?with_fcgi:BuildRequires:	fcgi-devel}
 BuildRequires:	flex
 %if %{with mssql} || %{with sybase} || %{with sybase_ct}
 BuildRequires:	freetds-devel
@@ -179,7 +180,6 @@
 BuildRequires:	readline-devel
 %{?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
 %{?with_sqlite:BuildRequires:	sqlite-devel}
 BuildRequires:	t1lib-devel
@@ -202,8 +202,10 @@
 %define		_phpsharedir	%{_datadir}/php
 %define		extensionsdir	%{_libdir}/php
 
-# redefine to use versions from current source
-%define		__php_includedir %{_builddir}/%{name}-%{version}
+# must be in sync with source. extra check ensuring that it is so is done in %%build
+%define		php_api_version		20041225
+%define		zend_module_api		20050617
+%define		zend_extension_api	220050617
 
 %description
 PHP is an HTML-embedded scripting language. PHP attempts to make it
@@ -1338,6 +1340,20 @@
 %description tidy -l pl
 Moduł PHP umożliwiający korzystanie z tidy.
 
+%package tokenizer
+Summary:	tokenizer extension module for PHP
+Summary(pl):	Moduł rozszerzenia tokenizer dla PHP
+Group:		Libraries
+Requires(post,preun):	%{name}-common = %{epoch}:%{version}-%{release}
+Requires:	%{name}-common = %{epoch}:%{version}-%{release}
+
+%description tokenizer
+This is a dynamic shared object (DSO) for PHP that will add tokenizer
+support.
+
+%description tokenizer -l pl
+Moduł PHP dodający obsługę tokenizera do PHP.
+
 %package wddx
 Summary:	wddx extension module for PHP
 Summary(pl):	Moduł wddx dla PHP
@@ -1441,7 +1457,6 @@
 Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
-# IMPORTANT: if you change '%setup', you should change %__php_includedir macro earlier in this file
 %setup -q -n %{name}-%{version}%{_rc}
 # this patch is broken by design, breaks --enable-versioning for example
 # update: --enable-version is broken by itself, it disables dynamic modules.
@@ -1496,6 +1511,21 @@
 sed -i -e 's#apr-config#apr-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.
@@ -1504,6 +1534,7 @@
 
 EXTENSION_DIR="%{extensionsdir}"; export EXTENSION_DIR
 if [ ! -f _built-conf ]; then # configure once (for faster debugging purposes)
+	rm -f Makefile.{fcgi,cgi,cli,apxs{1,2}} # now remove Makefile copies
 	./buildconf --force
 	%{__libtoolize}
 	%{__aclocal}
@@ -1514,7 +1545,10 @@
 
 # Apache SAPIs should be last one listed here
 sapis="
-fcgi cgi cli
+%if %{with fcgi}
+fcgi
+%endif
+cgi cli
 %if %{with apache1}
 apxs1
 %endif
@@ -1596,6 +1630,7 @@
 	--enable-safe-mode \
 	--enable-soap=shared \
 	--enable-sockets=shared \
+	--enable-tokenizer=shared \
 	--enable-ucd-snmp-hack \
 	%{?with_wddx:--enable-wddx=shared} \
 	--enable-xml=shared \
@@ -1690,10 +1725,12 @@
 %endif
 
 # FCGI
+%if %{with fcgi}
 cp -af php_config.h.fcgi main/php_config.h
 %{__make} sapi/cgi/php -f Makefile.fcgi
 cp -r sapi/cgi sapi/fcgi
 rm -rf sapi/cgi/.libs sapi/cgi/*.lo
+%endif
 
 # CGI
 cp -af php_config.h.cgi main/php_config.h
@@ -1732,7 +1769,9 @@
 libtool --silent --mode=install install sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php.cgi
 
 # install FCGI
+%if %{with fcgi}
 libtool --silent --mode=install install sapi/fcgi/php $RPM_BUILD_ROOT%{_bindir}/php.fcgi
+%endif
 
 # install CLI
 libtool --silent --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli
@@ -1745,7 +1784,9 @@
 ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php
 
 sed -e 's#/usr/lib/php#%{_libdir}/php#g' php.ini > $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
+%if %{with fcgi}
 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi-fcgi.ini
+%endif
 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini
 install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
 install %{SOURCE3} $RPM_BUILD_ROOT%{_sbindir}
@@ -1755,12 +1796,14 @@
 install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/apache/icons
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf
 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache.ini
+rm -f $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.la
 %endif
 
 %if %{with apache2}
 install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/httpd/icons
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/70_mod_php.conf
 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
+rm -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la
 %endif
 
 cp -f Zend/LICENSE{,.Zend}
@@ -2266,6 +2309,12 @@
 %postun tidy
 %extension_postun
 
+%post tokenizer
+%extension_post
+
+%postun tokenizer
+%extension_postun
+
 %post wddx
 %extension_post
 
@@ -2467,8 +2516,6 @@
 %triggerun zlib -- %{name}-zlib < 4:5.0.4-9.1
 [ ! -x %{_sbindir}/php-module-install ] || %{_sbindir}/php-module-install remove zlib %{_sysconfdir}/php.ini
 
-#%files
-
 %if %{with apache1}
 %files -n apache1-mod_php
 %defattr(644,root,root,755)
@@ -2487,10 +2534,12 @@
 /home/services/httpd/icons/*
 %endif
 
+%if %{with fcgi}
 %files fcgi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/php.fcgi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cgi-fcgi.ini
+%endif
 
 %files cgi
 %defattr(644,root,root,755)
@@ -2507,9 +2556,8 @@
 %files common
 %defattr(644,root,root,755)
 %doc php.ini-*
-%doc CODING_STANDARDS CREDITS Zend/ZEND_CHANGES
+%doc CREDITS Zend/ZEND_CHANGES
 %doc LICENSE Zend/LICENSE.Zend EXTENSIONS NEWS TODO*
-%doc README.EXT_SKEL README.SELF-CONTAINED-EXTENSIONS
 
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
@@ -2522,6 +2570,9 @@
 
 %files devel
 %defattr(644,root,root,755)
+%doc README.UNIX-BUILD-SYSTEM
+%doc README.EXT_SKEL README.SELF-CONTAINED-EXTENSIONS
+%doc CODING_STANDARDS
 %attr(755,root,root) %{_bindir}/phpize
 %attr(755,root,root) %{_bindir}/php-config
 %attr(755,root,root) %{_libdir}/libphp_common.so
@@ -2881,6 +2932,11 @@
 %attr(755,root,root) %{extensionsdir}/tidy.so
 %endif
 
+%files tokenizer
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/tokenizer.ini
+%attr(755,root,root) %{extensionsdir}/tokenizer.so
+
 %if %{with wddx}
 %files wddx
 %defattr(644,root,root,755)
@@ -2921,6 +2977,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.467.2.12  2005/10/09 16:14:38  glen
+- merged from HEAD, dropped php-pearprov
+
 Revision 1.467.2.11  2005/09/15 21:11:35  glen
 - rel macro for simplicity
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php.spec?r1=1.467.2.11&r2=1.467.2.12&f=u




More information about the pld-cvs-commit mailing list