packages: php/php.spec - build config fragments in build section (@PHP_5_2)

glen glen at pld-linux.org
Tue Mar 16 10:57:01 CET 2010


Author: glen                         Date: Tue Mar 16 09:57:01 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- build config fragments in build section (@PHP_5_2)

---- Files affected:
packages/php:
   php.spec (1.855 -> 1.856) 

---- Diffs:

================================================================
Index: packages/php/php.spec
diff -u packages/php/php.spec:1.855 packages/php/php.spec:1.856
--- packages/php/php.spec:1.855	Tue Mar 16 10:55:34 2010
+++ packages/php/php.spec	Tue Mar 16 10:56:56 2010
@@ -2046,13 +2046,36 @@
 %{__make} -f Makefile.cli
 [ "$(echo '<?=php_sapi_name();' | ./sapi/cli/php -qn)" = cli ] || exit 1
 
+# Generate stub .ini files for each extension
+rm -rf conf.d
+install -d conf.d
+generate_inifiles() {
+	for so in modules/*.so; do
+		mod=$(basename $so .so)
+		conf="$mod.ini"
+		# xml needs to be loaded before wddx
+		[ "$mod" = "wddx" ] && conf="xml_$mod.ini"
+		# pre needs to be loaded before SPL
+		[ "$mod" = "pcre" ] && conf="PCRE.ini"
+		# spl needs to be loaded before mysqli
+		[ "$mod" = "spl" ] && conf="SPL.ini"
+		echo "+ $conf"
+		cat > conf.d/$conf <<-EOF
+			; Enable $mod extension module
+			extension=$mod.so
+		EOF
+	done
+}
+generate_inifiles
+
 # Check that the module inner-dependencies are intact
-PHP=./sapi/cli/php EXTENSION_DIR=modules ./dep-tests.sh > dep-tests.log
+PHP=./sapi/cli/php EXTENSION_DIR=modules CONFDIR=conf.d ./dep-tests.sh > dep-tests.log
 if grep -v OK dep-tests.log; then
 	echo >&2 "The results above were not expected"
 	exit 1
 fi
 
+
 %if %{with tests}
 # Run tests, using the CLI SAPI
 cp -af php_config.h.cli main/php_config.h
@@ -2136,26 +2159,8 @@
 rm -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la
 %endif
 
-# Generate stub .ini files for each subpackage
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
-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"
-		# pre needs to be loaded before SPL
-		[ "$mod" = "pcre" ] && conf="%{_sysconfdir}/conf.d/PCRE.ini"
-		# spl needs to be loaded before mysqli
-		[ "$mod" = "spl" ] && conf="%{_sysconfdir}/conf.d/SPL.ini"
-		echo "+ $conf"
-		cat > $RPM_BUILD_ROOT$conf <<-EOF
-			; Enable $mod extension module
-			extension=$mod.so
-		EOF
-	done
-}
-generate_inifiles
+cp -a conf.d/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 
 # for CLI SAPI only
 mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/{pcntl,readline}.ini,cli.d}
@@ -3042,6 +3047,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.856  2010/03/16 09:56:56  glen
+- build config fragments in build section (@PHP_5_2)
+
 Revision 1.855  2010/03/16 09:55:34  glen
 - PHP_5_2:
   - sqlite ext has hard dependency on spl and pdo
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/php.spec?r1=1.855&r2=1.856&f=u



More information about the pld-cvs-commit mailing list