SPECS (DEVEL): php4.spec - cleanups

glen glen at pld-linux.org
Wed Jul 6 23:31:32 CEST 2005


Author: glen                         Date: Wed Jul  6 21:31:32 2005 GMT
Module: SPECS                         Tag: DEVEL
---- Log message:
- cleanups

---- Files affected:
SPECS:
   php4.spec (1.421.2.3.2.25 -> 1.421.2.3.2.26) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.421.2.3.2.25 SPECS/php4.spec:1.421.2.3.2.26
--- SPECS/php4.spec:1.421.2.3.2.25	Fri Jun 17 16:52:08 2005
+++ SPECS/php4.spec	Wed Jul  6 23:31:25 2005
@@ -9,6 +9,7 @@
 # - Obsoletes apache-mod_php and phpfi are whose? apache2 apache1 module? both? neither?
 # - how to ensure proper sapi upgrade? (look apache1-mod_php4 preable)
 # - should the apache-mod_php4 provide php{,4} package?
+#
 # Conditional build:
 %bcond_with	db3		# use db3 packages instead of db (4.x) for Berkeley DB support
 %bcond_with	fdf		# with FDF (PDF forms) module		(BR: proprietary lib)
@@ -46,7 +47,7 @@
 %bcond_without	xslt		# without XSLT extension module
 %bcond_without	yaz		# without YAZ extension module
 %bcond_without	apache1		# disable building apache 1.3.x module
-%bcond_without	apache2		# disable building apache 2.0.x module
+%bcond_without	apache2		# disable building apache 2.x module
 %bcond_with	zts		# enable-experimental-zts
 
 %define apxs1		/usr/sbin/apxs1
@@ -76,7 +77,7 @@
 Summary(uk):	PHP ÷ĹŇÓŚ§ 4 - ÍĎ×Á ĐŇĹĐŇĎĂĹÓŐ×ÁÎÎŃ HTML-ĆÁĘĚŚ×, ×ÉËĎÎŐ×ÁÎÁ ÎÁ ÓĹŇ×ĹŇŚ
 Name:		php4
 Version:	4.3.11
-Release:	4.20%{?with_hardened:hardened}
+Release:	4.21%{?with_hardened:hardened}
 Epoch:		3
 Group:		Libraries
 License:	PHP
@@ -201,14 +202,14 @@
 BuildRequires:	zlib-devel >= 1.0.9
 BuildRequires:	zziplib-devel
 # apache 1.3 vs apache 2.0
-#%if %{with apache2}
+%if %{with apache2}
 BuildRequires:	apache-devel >= 2.0.52-2
 BuildRequires:	apr-devel >= 1:1.0.0
 BuildRequires:	apr-util-devel >= 1:1.0.0
-#%endif
-#%if %{with apache1}
+%endif
+%if %{with apache1}
 BuildRequires:	apache1-devel >= 1.3.33-2
-#%endif
+%endif
 PreReq:		%{name}-common = %{epoch}:%{version}-%{release}
 Provides:	php = %{epoch}:%{version}-%{release}
 Obsoletes:	phpfi
@@ -1642,7 +1643,7 @@
 CFLAGS="%{rpmcflags} -DEAPI=1 -I/usr/X11R6/include"
 
 EXTENSION_DIR="%{extensionsdir}"; export EXTENSION_DIR
-if [ ! -f _built-conf ]; then
+if [ ! -f _built-conf ]; then # do just once, for debugging purposes
 ./buildconf --force
 %{__libtoolize}
 %{__aclocal}
@@ -1651,8 +1652,15 @@
 fi
 PROG_SENDMAIL="/usr/lib/sendmail"; export PROG_SENDMAIL
 
-sapis="fcgi cgi cli apxs1 apxs2"
-#sapis=""
+sapis="
+fcgi cgi cli
+%if %{with apache1}
+apxs1
+%endif
+%if %{with apache2}
+apxs2
+%endif
+"
 
 # Apache2 CFLAGS. should be harmless for other SAPIs.
 CFLAGS="$CFLAGS $(%{_bindir}/apr-1-config --cppflags --includes) $(%{_bindir}/apu-1-config --includes)"
@@ -1784,6 +1792,7 @@
 	--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
@@ -1799,34 +1808,17 @@
 sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" libphp_common.la
 
 %if %{with apache1}
-#%{__make} libphp4.la -f Makefile.apxs1
-#sed -i -e "
-#s|^libdir=.*|libdir='sapi/apache'|;
-#s|^(relink_command=.* -rpath )[^ ]*/libs |$1sapi/apache |" libphp4.la
-#
-#libtool --silent --mode=install cp libphp4.la `pwd`/sapi/apache
-#rm -f libphp4.la .libs/libphp4.so
-
-%{__make} sapi/apache/libphp4.la -f Makefile.apxs1
+%{__make} sapi LIBTOOL_SAPI=sapi/apache/libphp4.la -f Makefile.apxs1
 sed -i -e "
 s|^libdir=.*|libdir='%{_libdir}/apache1'|;
 s|^(relink_command=.* -rpath )[^ ]*/libs |$1%{_libdir}/apache1 |" sapi/apache/libphp4.la
-
-#mv .libs/libphp4.so libphp4-apxs1.so
 %endif
 
 %if %{with apache2}
-#%{__make} libphp4.la -f Makefile.apxs2
-#libtool --silent --mode=install cp libphp4.la `pwd`/sapi/apache2handler
-#rm -f libphp4.la .libs/libphp4.so
-
-%{__make} sapi/apache2handler/libphp4.la -f Makefile.apxs2
+%{__make} sapi LIBTOOL_SAPI=sapi/apache2handler/libphp4.la -f Makefile.apxs2
 sed -i -e "
 s|^libdir=.*|libdir='%{_libdir}/apache'|;
 s|^(relink_command=.* -rpath )[^ ]*/libs |$1%{_libdir}/apache |" sapi/apache2handler/libphp4.la
-
-#mv -f .libs/libphp4.so libphp4-apxs2.so
-#rm -f libphp4.la
 %endif
 
 # for fcgi: -DDISCARD_PATH=0 -DENABLE_PATHINFO_CHECK=1 -DFORCE_CGI_REDIRECT=0
@@ -1860,20 +1852,13 @@
 # LIBTOOL GURUS COULD LOOK AT THIS MESS AND THROW THEIR GOOD IDEAS HERE
 %if %{with apache1}
 install sapi/apache/.libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4.so
-#libtool --silent --mode=install install sapi/apache/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache1
-#install libphp4-apxs1.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp4.so
 %endif
 
 # install apache2 DSO module
 %if %{with apache2}
 install sapi/apache2handler/.libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp4.so
-#install libphp4-apxs2.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp4.so
-#libtool --silent --mode=install install sapi/apache2handler/libphp4.la $RPM_BUILD_ROOT%{_libdir}/apache
 %endif
 
-#install .libs/libphp_common.so $RPM_BUILD_ROOT%{_libdir}
-#install .libs/libphp_common-*.so $RPM_BUILD_ROOT%{_libdir}
-#install libphp_common.la $RPM_BUILD_ROOT%{_libdir}
 libtool --silent --mode=install install libphp_common.la $RPM_BUILD_ROOT%{_libdir}
 
 # install the apache modules' files
@@ -1881,32 +1866,24 @@
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # install CGI
-#install sapi/cgi/.libs/php $RPM_BUILD_ROOT%{_bindir}/php4.cgi
 libtool --silent --mode=install install sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php4.cgi
 
 # install FCGI
-#install sapi/fcgi/.libs/php $RPM_BUILD_ROOT%{_bindir}/php4.fcgi
 libtool --silent --mode=install install sapi/fcgi/php $RPM_BUILD_ROOT%{_bindir}/php4.fcgi
 
 # install CLI
-#install sapi/cli/.libs/php $RPM_BUILD_ROOT%{_bindir}/php4.cli
 libtool --silent --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php4.cli
 
 install sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php4.1
 ln -sf php4.cli $RPM_BUILD_ROOT%{_bindir}/php4
 
-#install='$(LIBTOOL) --silent --mode=install install'
-#%{__make} install \
-#	INSTALL_ROOT=$RPM_BUILD_ROOT \
-#	INSTALL_IT="\$(LIBTOOL) --mode=install install libphp_common.la $RPM_BUILD_ROOT%{_libdir} ; \$(LIBTOOL) --mode=install install libphp4.la $RPM_BUILD_ROOT%{apachelib} ; \$(LIBTOOL) --mode=install install sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php.cgi ; \$(LIBTOOL) --mode=install install sapi/fcgi/php $RPM_BUILD_ROOT%{_bindir}/php.fcgi" \
-#	INSTALL_CLI="\$(LIBTOOL) --mode=install install sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli"
-
 %{?with_java:install ext/java/php_java.jar $RPM_BUILD_ROOT%{extensionsdir}}
 
 install php.ini	$RPM_BUILD_ROOT%{_sysconfdir}/php.ini
 for i in %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
 	install $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i|sed -e "s at php4@php at g")
 done
+
 install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/httpd/icons
 install %{SOURCE2} php.gif $RPM_BUILD_ROOT/home/services/apache/icons
 install %{SOURCE3} $RPM_BUILD_ROOT%{_sbindir}
@@ -1916,13 +1893,6 @@
 
 cp -f Zend/LICENSE{,.Zend}
 
-# Is it really needed? Breaks installation of php4-devel (when replacing php-devel)
-#%%ifarch amd64
-#ln -sf ../../lib/php/build $RPM_BUILD_ROOT%{_libdir}/php/build
-#%%endif
-
-#rm -f $RPM_BUILD_ROOT%{_libdir}/apache{,1}/libphp4.la
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -2951,6 +2921,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.421.2.3.2.26  2005/07/06 21:31:25  glen
+- cleanups
+
 Revision 1.421.2.3.2.25  2005/06/17 14:52:08  glen
 - cleanups
 - added TODO (really comments needed)
================================================================

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




More information about the pld-cvs-commit mailing list