]> git.pld-linux.org Git - packages/php.git/commitdiff
- build config fragments in build section (@PHP_5_2)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 16 Mar 2010 09:56:56 +0000 (09:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php.spec -> 1.856

php.spec

index 61d03d169f4501e810efe54526a49048e709a618..d360b5e893a7df84bf799e75905eb9af6412836e 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -2045,13 +2045,36 @@ cp -af php_config.h.cli main/php_config.h
 %{__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
@@ -2135,26 +2158,8 @@ cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache2handler.d/php-apache2handl
 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}
This page took 0.151053 seconds and 4 git commands to generate.