SPECS: php4.spec - merged changes from php.spec (fcgi bcond, build...

glen glen at pld-linux.org
Sat Jan 14 11:14:09 CET 2006


Author: glen                         Date: Sat Jan 14 10:14:09 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- merged changes from php.spec (fcgi bcond, build fixes)
- rel 2 for amd64 build fixes

---- Files affected:
SPECS:
   php4.spec (1.518 -> 1.519) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.518 SPECS/php4.spec:1.519
--- SPECS/php4.spec:1.518	Sat Jan 14 10:28:52 2006
+++ SPECS/php4.spec	Sat Jan 14 11:14:02 2006
@@ -50,6 +50,7 @@
 %bcond_without	yaz		# without YAZ 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
 %bcond_without	zts		# disable experimental-zts
 %define apxs1		/usr/sbin/apxs1
 %define	apxs2		/usr/sbin/apxs
@@ -77,7 +78,7 @@
 Summary(uk):	PHP ÷ĹŇÓŚ§ 4 - ÍĎ×Á ĐŇĹĐŇĎĂĹÓŐ×ÁÎÎŃ HTML-ĆÁĘĚŚ×, ×ÉËĎÎŐ×ÁÎÁ ÎÁ ÓĹŇ×ĹŇŚ
 Name:		php4
 Version:	4.4.2
-%define	_rel 1
+%define	_rel 2
 Release:	%{_rel}%{?with_hardening:hardened}
 Epoch:		3
 License:	PHP
@@ -148,7 +149,7 @@
 %if %{with wddx} || %{with xml} || %{with xmlrpc}
 BuildRequires:	expat-devel
 %endif
-BuildRequires:	fcgi-devel
+%{?with_fcgi:BuildRequires:	fcgi-devel}
 %{?with_fdf:BuildRequires:	fdftk-devel}
 BuildRequires:	flex
 %if %{with mssql} || %{with sybase}
@@ -1712,7 +1713,10 @@
 PROG_SENDMAIL="/usr/lib/sendmail"; export PROG_SENDMAIL
 
 sapis="
-fcgi cgi cli
+%if %{with fcgi}
+fcgi
+%endif
+cgi cli
 %if %{with apache1}
 apxs1
 %endif
@@ -1845,8 +1849,6 @@
 	--with-zlib=shared --with-zlib-dir=shared,/usr \
 
 	cp -f Makefile Makefile.$sapi
-
-	# left for debugging purposes
 	cp -f main/php_config.h php_config.h.$sapi
 done
 
@@ -1874,21 +1876,20 @@
 s|^(relink_command=.* -rpath )[^ ]*/libs |$1%{_libdir}/apache |" sapi/apache2handler/libphp4.la
 %endif
 
-# for fcgi: -DDISCARD_PATH=0 -DENABLE_PATHINFO_CHECK=1 -DFORCE_CGI_REDIRECT=0
-# -DHAVE_FILENO_PROTO=1 -DHAVE_FPOS=1 -DHAVE_LIBNSL=1(die) -DHAVE_SYS_PARAM_H=1
-# -DPHP_FASTCGI=1 -DPHP_FCGI_STATIC=1 -DPHP_WRITE_STDOUT=1
-%{__make} sapi/cgi/php -f Makefile.fcgi \
-	CFLAGS_CLEAN="%{rpmcflags} -DDISCARD_PATH=0 -DENABLE_PATHINFO_CHECK=1 -DFORCE_CGI_REDIRECT=0 -DHAVE_FILENO_PROTO=1 -DHAVE_FPOS=1 -DHAVE_LIBNSL=1 -DHAVE_SYS_PARAM_H=1 -DPHP_FASTCGI=1 -DPHP_FCGI_STATIC=1 -DPHP_WRITE_STDOUT=1"
+# 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
 
-# notes:
-# -DENABLE_CHROOT_FUNC=1 (cgi,fcgi) is used in ext/standard/dir.c (libphp_common)
-# -DPHP_WRITE_STDOUT is used also for cli, but not set by its config.m4
-%{__make} sapi/cgi/php -f Makefile.cgi \
-	CFLAGS_CLEAN="%{rpmcflags} -DDISCARD_PATH=1 -DENABLE_PATHINFO_CHECK=1 -DFORCE_CGI_REDIRECT=0 -DPHP_WRITE_STDOUT=1"
+# CGI
+cp -af php_config.h.cgi main/php_config.h
+%{__make} sapi/cgi/php -f Makefile.cgi
 
 # CLI
+cp -af php_config.h.cli main/php_config.h
 %{__make} sapi/cli/php -f Makefile.cli
 
 %install
@@ -1922,7 +1923,9 @@
 libtool --silent --mode=install install sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php4.cgi
 
 # install FCGI
+%if %{with fcgi}
 libtool --silent --mode=install install sapi/fcgi/php $RPM_BUILD_ROOT%{_bindir}/php4.fcgi
+%endif
 
 # install CLI
 libtool --silent --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php4.cli
@@ -1934,7 +1937,9 @@
 %{?with_java:install ext/java/php_java.jar $RPM_BUILD_ROOT%{extensionsdir}}
 
 install 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}
@@ -2705,11 +2710,13 @@
 /home/services/httpd/icons/*
 %endif
 
+%if %{with fcgi}
 %files fcgi
 %defattr(644,root,root,755)
 %doc sapi/cgi/{CREDITS,README.FastCGI}
 %attr(755,root,root) %{_bindir}/php4.fcgi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cgi-fcgi.ini
+%endif
 
 %files cgi
 %defattr(644,root,root,755)
@@ -3236,6 +3243,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.519  2006/01/14 10:14:02  glen
+- merged changes from php.spec (fcgi bcond, build fixes)
+- rel 2 for amd64 build fixes
+
 Revision 1.518  2006/01/14 09:28:52  glen
 - sorted configure
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php4.spec?r1=1.518&r2=1.519&f=u



More information about the pld-cvs-commit mailing list