SPECS: php4.spec - AC-branch merge

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


Author: glen                         Date: Sat Nov 10 15:04:57 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- AC-branch merge

---- Files affected:
SPECS:
   php4.spec (1.596 -> 1.597) 

---- Diffs:

================================================================
Index: SPECS/php4.spec
diff -u SPECS/php4.spec:1.596 SPECS/php4.spec:1.597
--- SPECS/php4.spec:1.596	Sat Nov  3 16:17:26 2007
+++ SPECS/php4.spec	Sat Nov 10 16:04:52 2007
@@ -74,7 +74,7 @@
 %undefine	with_msession
 %endif
 
-%define	_rel 8
+%define	_rel 10
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):	Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):	Język skryptowy PHP
@@ -1134,6 +1134,7 @@
 Summary:	Process Control extension module for PHP
 Summary(pl.UTF-8):	Moduł Process Control dla PHP
 Group:		Libraries
+Requires:	%{name}-cli = %{epoch}:%{version}-%{release}
 Requires:	%{name}-common = %{epoch}:%{version}-%{release}
 Provides:	php(pcntl)
 
@@ -1602,31 +1603,36 @@
 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}
@@ -1641,30 +1647,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
@@ -1772,9 +1780,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}
@@ -1788,18 +1793,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
@@ -1868,22 +1877,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
@@ -3128,6 +3137,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.597  2007/11/10 15:04:52  glen
+- AC-branch merge
+
 Revision 1.596  2007/11/03 15:17:26  baggins
 - rel 8
 
================================================================

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



More information about the pld-cvs-commit mailing list