]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
cleanup bogus /etc/php/cgi dir
[packages/php.git] / php.spec
index fe0d2e956d0da03cf657ce73fdecf185ea220302..bd11326f01539eddf5f973c226dc432692f3acee 100644 (file)
--- a/php.spec
+++ b/php.spec
 %undefine      with_pdo_sqlite
 %endif
 
-%define                subver beta1
+%define                subver beta2
 %define                rel     1
 %define                orgname php
 %define                ver_suffix 74
@@ -168,12 +168,13 @@ License:  PHP 3.01 and Zend and BSD
 Group:         Libraries
 #Source0:      https://php.net/distributions/%{orgname}-%{version}.tar.xz
 Source0:       https://downloads.php.net/~derick/php-%{version}%{subver}.tar.xz
-# Source0-md5: fa3501cf158adce37359667383ddb672
+# Source0-md5: 51a42ffa81be306d7a1b2f073e4fba05
 Source1:       opcache.ini
 Source2:       %{orgname}-mod_php.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
 Source5:       %{orgname}-cli.ini
+Source6:       timezone.ini
 Source10:      %{orgname}-fpm.init
 Source11:      %{orgname}-fpm.logrotate
 Source12:      %{orgname}-branch.sh
@@ -307,7 +308,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                fileinfover     %{version}
 %define                hashver         %{version}
 %define                intlver         %{version}
-%define                jsonver         1.7.0
+%define                jsonver         %{version}
 %define                pharver         %{version}
 %define                sqlite3ver      %{version}
 %define                zipver          1.15.4
@@ -2066,8 +2067,8 @@ if test "$ver" != "%{zipver}"; then
        : Update the zipver macro and rebuild.
        exit 1
 fi
-ver=$(sed -n '/#define PHP_JSON_VERSION /{s/.* "//;s/".*$//;p}' ext/json/php_json.h)
-if test "$ver" != "%{jsonver}"; then
+ver=$(get_version PHP_JSON_VERSION ext/json/php_json.h)
+if test "$ver" != "PHP_VERSION"; then
        : Error: Upstream JSON version is now ${ver}, expecting %{jsonver}.
        : Update the jsonver macro and rebuild.
        exit 1
@@ -2416,9 +2417,11 @@ exit $rc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cgi}} \
+install -d \
+       $RPM_BUILD_ROOT%{_libdir}/{php,apache} \
+       $RPM_BUILD_ROOT%{_sysconfdir}/{conf,cgi-fcgi,cli,apache2handler}.d \
        $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}} \
-       $RPM_BUILD_ROOT/etc/{apache/conf.d,httpd/conf.d} \
+       $RPM_BUILD_ROOT/etc/httpd/conf.d \
        $RPM_BUILD_ROOT%{_mandir}/man{1,8} \
 
 cp -pf php_config.h.cli main/php_config.h
@@ -2525,6 +2528,7 @@ echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
 ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
 
 cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/timezone.ini
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
 
 %if %{with apache2}
@@ -2544,9 +2548,6 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 cp -p conf.d/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 cp -p %{_sourcedir}/opcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
 
-# per SAPI ini directories
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d
-
 # for CLI SAPI only
 %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/??_readline.ini,cli.d}
 
@@ -2612,7 +2613,7 @@ if ! grep -q '^date.timezone[[:space:]]*=' %{_sysconfdir}/php.ini && [ -f /etc/s
        TIMEZONE=
        . /etc/sysconfig/timezone
        if [ "$TIMEZONE" ]; then
-               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/php.ini
+               %{__sed} -i -e "s,^;date.timezone[[:space:]]*=.*,date.timezone = $TIMEZONE," %{_sysconfdir}/conf.d/timezone.ini
        fi
 fi
 
@@ -2626,7 +2627,6 @@ fi
 # common package are very important for all this to work.
 
 # restart webserver at the end of transaction
-[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
 [ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
 
 %triggerpostun common -- php-common < 4:5.3.28-7
@@ -2841,6 +2841,7 @@ fi
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/timezone.ini
 %attr(755,root,root) %{_libdir}/libphp_common-*.so
 %dir %{php_extensiondir}
 
This page took 0.140174 seconds and 4 git commands to generate.