SPECS (AC-branch): php4.spec - add -fcgi-graceful.patch, php.spec ...

glen glen at pld-linux.org
Sat Nov 10 16:02:04 CET 2007


Author: glen                         Date: Sat Nov 10 15:02:04 2007 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- add -fcgi-graceful.patch, php.spec merges; rel 9

---- Files affected:
SPECS:
   php4.spec (1.576.2.11 -> 1.576.2.12) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.576.2.11 SPECS/php4.spec:1.576.2.12
--- SPECS/php4.spec:1.576.2.11	Mon Sep  3 15:05:59 2007
+++ SPECS/php4.spec	Sat Nov 10 16:01:58 2007
@@ -73,7 +73,7 @@
 %undefine	with_msession
 %endif
 
-%define	_rel 4
+%define	_rel 9
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr):	Le langage de script embarque-HTML PHP
 Summary(pl):	Jêzyk skryptowy PHP
@@ -143,6 +143,7 @@
 Patch45:	%{name}-config-dir.patch
 Patch46:	%{name}-phpinfo_no_configure.patch
 Patch47:	%{name}-ming.patch
+Patch48:	%{name}-fcgi-graceful.patch
 URL:		http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -1595,36 +1596,42 @@
 %patch45 -p1
 %patch46 -p1
 %patch47 -p1
+%patch48 -p1
 
 %if %{with hardening}
 zcat %{SOURCE8} | patch -p1
 %endif
 
+cp -f Zend/LICENSE{,.Zend}
+
 %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."
+API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h)
+if [ $API != %{php_api_version} ]; then
+	echo "Set %%define php_api_version to $API and re-run."
 	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."
+API=$(awk '/#define ZEND_MODULE_API_NO/{print $3}' Zend/zend_modules.h)
+if [ $API != %{zend_module_api} ]; then
+	echo "Set %%define zend_module_api to $API and re-run."
 	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_extension_api to $API and rerun."
+API=$(awk '/#define ZEND_EXTENSION_API_NO/{print $3}' Zend/zend_extensions.h)
+if [ $API != %{zend_extension_api} ]; then
+	echo "Set %%define zend_extension_api to $API and re-run."
 	exit 1
 fi
 
-EXTENSION_DIR="%{extensionsdir}"; export EXTENSION_DIR
+export EXTENSION_DIR="%{extensionsdir}"
 if [ ! -f _built-conf ]; then # configure once (for faster debugging purposes)
-	./buildconf --force
+	rm -f Makefile.{fcgi,cgi,cli,apxs{1,2}} # now remove Makefile copies
 	%{__libtoolize}
 	%{__aclocal}
-	%{__autoconf}
+	./buildconf --force
 	touch _built-conf
 fi
-PROG_SENDMAIL="/usr/lib/sendmail"; export PROG_SENDMAIL
+export PROG_SENDMAIL="/usr/lib/sendmail"
 
 sapis="
 %if %{with fcgi}
@@ -1639,30 +1646,32 @@
 %endif
 "
 for sapi in $sapis; do
+	: SAPI $sapi
 	[ -f Makefile.$sapi ] && continue # skip if already configured (for faster debugging purposes)
 
-	%configure \
-	`
+	sapi_args=''
 	case $sapi in
 	cgi)
-		echo --enable-discard-path --enable-force-cgi-redirect
-	;;
+		sapi_args='--enable-discard-path --enable-force-cgi-redirect'
+		;;
 	cli)
-		echo --disable-cgi
-	;;
+		sapi_args='--disable-cgi'
+		;;
 	fcgi)
-		echo --enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect
-	;;
+		sapi_args='--enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect'
+		;;
 	apxs1)
-		ver=%(rpm -q --qf '%%{version}' apache1-apxs)
-		echo --with-apxs=%{apxs1} --with-apache-version=$ver
-	;;
+		ver=$(rpm -q --qf '%{V}' apache1-devel)
+		sapi_args="--with-apxs=%{apxs1} --with-apache-version=$ver"
+		;;
 	apxs2)
-		ver=%(rpm -q --qf '%%{version}' apache-apxs)
-		echo --with-apxs2=%{apxs2} --with-apache-version=$ver
-	;;
+		ver=$(rpm -q --qf '%{V}' apache-devel)
+		sapi_args="--with-apxs2=%{apxs2} --with-apache-version=$ver"
+		;;
 	esac
-	` \
+
+	%configure \
+	$sapi_args \
 %if "%{!?configure_cache:0}%{?configure_cache}" == "0"
 	--cache-file=config.cache \
 %endif
@@ -1770,9 +1779,6 @@
 
 # must make this first, so modules can link against it.
 %{__make} libphp_common.la
-# FIXME: needed for linking modules with libphp_common.la
-#libtool --mode=install cp libphp_common.la `pwd`/libs
-
 %{__make} build-modules
 
 %if %{with apache1}
@@ -1786,18 +1792,22 @@
 # FCGI
 %if %{with fcgi}
 cp -af php_config.h.fcgi main/php_config.h
+rm -rf sapi/cgi/.libs sapi/cgi/*.lo
 %{__make} sapi/cgi/php -f Makefile.fcgi
 cp -r sapi/cgi sapi/fcgi
-rm -rf sapi/cgi/.libs sapi/cgi/*.lo
+[ "$(echo '<?=php_sapi_name();' | ./sapi/fcgi/php -qn)" = cgi-fcgi ] || exit 1
 %endif
 
 # CGI
 cp -af php_config.h.cgi main/php_config.h
+rm -rf sapi/cgi/.libs sapi/cgi/*.lo
 %{__make} sapi/cgi/php -f Makefile.cgi
+[ "$(echo '<?=php_sapi_name();' | ./sapi/cgi/php -qn)" = cgi ] || exit 1
 
 # CLI
 cp -af php_config.h.cli main/php_config.h
 %{__make} sapi/cli/php -f Makefile.cli
+[ "$(echo '<?=php_sapi_name();' | ./sapi/cli/php -n)" = cli ] || exit 1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -1866,22 +1876,22 @@
 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
 %endif
 
-cp -f Zend/LICENSE{,.Zend}
-
-install ext/ext_skel $RPM_BUILD_ROOT%{_bindir}/php-ext_skel
-
 # Generate stub .ini files for each subpackage
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
-for so in modules/*.so; do
-	mod=$(basename $so .so)
-	conf="%{_sysconfdir}/conf.d/${mod}.ini"
-	# xml needs to be loaded before wddx
-	[ "$mod" = "wddx" ] && conf="%{_sysconfdir}/conf.d/xml_${mod}.ini"
-	cat > $RPM_BUILD_ROOT${conf} <<EOF
-; Enable ${mod} extension module
-extension=${mod}.so
-EOF
-done
+generate_inifiles() {
+	for so in modules/*.so; do
+		mod=$(basename $so .so)
+		conf="%{_sysconfdir}/conf.d/$mod.ini"
+		# xml needs to be loaded before wddx
+		[ "$mod" = "wddx" ] && conf="%{_sysconfdir}/conf.d/xml_$mod.ini"
+		echo "+ $conf"
+		cat > $RPM_BUILD_ROOT$conf <<-EOF
+			; Enable $mod extension module
+			extension=$mod.so
+		EOF
+	done
+}
+generate_inifiles
 
 # per SAPI ini directories
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi,cli,cgi-fcgi,apache,apache2handler}.d
@@ -3126,6 +3136,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.576.2.12  2007/11/10 15:01:58  glen
+- add -fcgi-graceful.patch, php.spec merges; rel 9
+
 Revision 1.576.2.11  2007/09/03 13:05:59  hawk
 - release 4 (imap 2006j2)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/php4.spec?r1=1.576.2.11&r2=1.576.2.12&f=u



More information about the pld-cvs-commit mailing list