|
@@ -1,6 +1,7 @@
|
|
%bcond_without apache2
|
|
%bcond_without apache2
|
|
|
|
|
|
%global majorver 5
|
|
%global majorver 5
|
|
|
|
+%global ap_suffix 5
|
|
%global _name php%{majorver}
|
|
%global _name php%{majorver}
|
|
|
|
|
|
%global srcname php-%{version}
|
|
%global srcname php-%{version}
|
|
@@ -45,13 +46,13 @@
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%define _use_internal_dependency_generator 0
|
|
%define _use_internal_dependency_generator 0
|
|
-%define __find_provides %{_builddir}/php-%{version}/find-provides.sh
|
|
|
|
-%define _built_php %{buildroot}%{_bindir}/php5
|
|
|
|
|
|
+%define __find_provides %{_builddir}/%{srcname}/find-provides.sh
|
|
|
|
+%define _built_php %{buildroot}%{_bindir}/php%{majorver}
|
|
|
|
|
|
-Name: php5
|
|
|
|
|
|
+Name: php%{majorver}
|
|
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
|
|
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
|
|
Summary(ja): HTML 埋め込み型スクリプト言語 PHP
|
|
Summary(ja): HTML 埋め込み型スクリプト言語 PHP
|
|
-Version: 5.6.10
|
|
|
|
|
|
+Version: 5.6.11
|
|
Release: 1%{_dist_release}
|
|
Release: 1%{_dist_release}
|
|
|
|
|
|
Vendor: Project Vine
|
|
Vendor: Project Vine
|
|
@@ -68,15 +69,16 @@ Source0: http://www.php.net/distributions/%{srcname}.tar.xz
|
|
Source13: macros.pear
|
|
Source13: macros.pear
|
|
|
|
|
|
Source20: README.vine
|
|
Source20: README.vine
|
|
-Source21: php.ini-vine.56
|
|
|
|
-Source23: php5.conf-apache1
|
|
|
|
-Source24: php5.conf-apache2
|
|
|
|
|
|
+Source21: php.ini-vine
|
|
|
|
+Source23: php.conf-apache1
|
|
|
|
+Source24: php.conf-apache2
|
|
Source25: php-fpm.init
|
|
Source25: php-fpm.init
|
|
-Source26: php-fpm.conf.56
|
|
|
|
-Source27: default-pool.conf.in.56
|
|
|
|
|
|
+Source26: php-fpm.conf
|
|
|
|
+Source27: default-pool.conf.in
|
|
Source28: php-fpm.logrotate
|
|
Source28: php-fpm.logrotate
|
|
Source29: php_params
|
|
Source29: php_params
|
|
Source30: find-provides.sh.in
|
|
Source30: find-provides.sh.in
|
|
|
|
+Source31: macros.pear.ver
|
|
|
|
|
|
Patch33: php-5.2.4-phpincludedir.patch
|
|
Patch33: php-5.2.4-phpincludedir.patch
|
|
|
|
|
|
@@ -583,7 +585,8 @@ build \
|
|
--enable-fpm
|
|
--enable-fpm
|
|
popd
|
|
popd
|
|
|
|
|
|
-sed -e 's/@WWWUSER@/%{fpm_user}/' -e 's/@WWWGROUP@/%{fpm_group}/' < %{SOURCE27} > default-pool.conf
|
|
|
|
|
|
+sed -e 's/@WWWUSER@/%{fpm_user}/' -e 's/@WWWGROUP@/%{fpm_group}/' \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/'< %{SOURCE27} > default-pool.conf
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
#----------------------------------------------------------------------
|
|
# Build Apache1 module
|
|
# Build Apache1 module
|
|
@@ -634,19 +637,20 @@ popd
|
|
# Append php.ini-vine
|
|
# Append php.ini-vine
|
|
cat %{SOURCE21} >> %{buildroot}%{php_confdir}/php.ini
|
|
cat %{SOURCE21} >> %{buildroot}%{php_confdir}/php.ini
|
|
# Use correct libdir
|
|
# Use correct libdir
|
|
-sed -i -e 's|%{_prefix}/lib|%{_libdir}|' %{buildroot}%{php_confdir}/php.ini
|
|
|
|
|
|
+sed -i \
|
|
|
|
+ -e 's|%{_prefix}/lib|%{_libdir}|' \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ %{buildroot}%{php_confdir}/php.ini
|
|
|
|
|
|
# Remove suffix
|
|
# Remove suffix
|
|
-ln -sf php-config%{majorver} %{buildroot}%{_bindir}/php-config
|
|
|
|
-ln -sf phpize%{majorver} %{buildroot}%{_bindir}/phpize
|
|
|
|
-%{__install} -m 755 scripts/dev/phpextdist %{buildroot}%{_bindir}
|
|
|
|
-cp %{buildroot}%{_mandir}/man1/php-config{%{majorver},}.1
|
|
|
|
-cp %{buildroot}%{_mandir}/man1/phpize{%{majorver},}.1
|
|
|
|
|
|
+%{__install} -m 755 scripts/dev/phpextdist %{buildroot}%{_bindir}/phpextdist%{majorver}
|
|
|
|
|
|
# fix path in phar
|
|
# fix path in phar
|
|
|
|
|
|
perl -pi -e 's|^#!/.+/build-cgi/sapi/cli/php$|#!/usr/bin/%{_name}|' %{buildroot}%{_bindir}/phar.phar
|
|
perl -pi -e 's|^#!/.+/build-cgi/sapi/cli/php$|#!/usr/bin/%{_name}|' %{buildroot}%{_bindir}/phar.phar
|
|
-
|
|
|
|
|
|
+mv %{buildroot}%{_bindir}/phar.phar %{buildroot}%{_bindir}/phar%{majorver}.phar
|
|
|
|
+mv %{buildroot}%{_mandir}/man1/phar.1 %{buildroot}%{_mandir}/man1/phar%{majorver}.1
|
|
|
|
+rm %{buildroot}%{_mandir}/man1/phar.phar.1
|
|
|
|
|
|
%if %{with_pear}
|
|
%if %{with_pear}
|
|
# http://pear.php.net/bugs/bug.php?id=6154
|
|
# http://pear.php.net/bugs/bug.php?id=6154
|
|
@@ -658,9 +662,17 @@ done
|
|
%{__install} -m 755 -d %{buildroot}%{pear_cachedir}
|
|
%{__install} -m 755 -d %{buildroot}%{pear_cachedir}
|
|
|
|
|
|
# install rpmmacro file for pear
|
|
# install rpmmacro file for pear
|
|
-mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
|
|
|
|
+mkdir -p %{buildroot}%{_datadir}/php%{majorver}
|
|
install -m 644 -c %{SOURCE13} \
|
|
install -m 644 -c %{SOURCE13} \
|
|
- %{buildroot}%{_sysconfdir}/rpm/macros.pear
|
|
|
|
|
|
+ %{buildroot}%{_datadir}/php%{majorver}/macros.pear
|
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ %{buildroot}%{_datadir}/php%{majorver}/macros.pear
|
|
|
|
+
|
|
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
|
|
+install -m 644 -c %{SOURCE31} \
|
|
|
|
+ %{buildroot}%{_sysconfdir}/rpm/macros.pear%{majorver}
|
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ %{buildroot}%{_sysconfdir}/rpm/macros.pear%{majorver}
|
|
%endif
|
|
%endif
|
|
|
|
|
|
# Install cgi/fcgi binaries
|
|
# Install cgi/fcgi binaries
|
|
@@ -673,11 +685,16 @@ mv %{buildroot}%{_bindir}/php-cgi%{majorver} %{buildroot}%{_bindir}/%{_name}-cgi
|
|
%{__install} -d %{buildroot}%{_mandir}/man8
|
|
%{__install} -d %{buildroot}%{_mandir}/man8
|
|
%{__install} -d %{buildroot}%{_sysconfdir}/logrotate.d
|
|
%{__install} -d %{buildroot}%{_sysconfdir}/logrotate.d
|
|
%{__install} -m 755 build-fpm/sapi/fpm/php-fpm %{buildroot}%{_sbindir}/%{_name}-fpm
|
|
%{__install} -m 755 build-fpm/sapi/fpm/php-fpm %{buildroot}%{_sbindir}/%{_name}-fpm
|
|
-%{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/php-fpm
|
|
|
|
-%{__install} -m 644 build-fpm/sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/
|
|
|
|
|
|
+%{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{_initdir}/%{_name}-fpm
|
|
|
|
+%{__install} -m 644 build-fpm/sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/%{_name}-fpm.8
|
|
%{__install} -m 644 %{SOURCE26} %{buildroot}%{php_confdir}/php-fpm.conf
|
|
%{__install} -m 644 %{SOURCE26} %{buildroot}%{php_confdir}/php-fpm.conf
|
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' %{buildroot}%{php_confdir}/php-fpm.conf
|
|
%{__install} -m 644 default-pool.conf %{buildroot}%{php_confdir}/fpm.d/default-pool.conf
|
|
%{__install} -m 644 default-pool.conf %{buildroot}%{php_confdir}/fpm.d/default-pool.conf
|
|
-%{__install} -m 644 %{SOURCE28} %{buildroot}%{_sysconfdir}/logrotate.d/php-fpm
|
|
|
|
|
|
+%{__install} -m 644 %{SOURCE28} %{buildroot}%{_sysconfdir}/logrotate.d/%{_name}-fpm
|
|
|
|
+sed -i \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ %{buildroot}%{_sysconfdir}/logrotate.d/%{_name}-fpm
|
|
|
|
|
|
|
|
|
|
# Install the Apache1 module, config fragment
|
|
# Install the Apache1 module, config fragment
|
|
@@ -690,23 +707,33 @@ ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache1_cgidir}/%{_name}-cgi
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache1_fcgidir}/%{_name}-fcgi
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache1_fcgidir}/%{_name}-fcgi
|
|
%{__install} -m 755 -d %{buildroot}%{apache1_confdir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache1_confdir}
|
|
%{__install} -m 644 %{SOURCE23} %{buildroot}%{apache1_confdir}/%{_name}.conf
|
|
%{__install} -m 644 %{SOURCE23} %{buildroot}%{apache1_confdir}/%{_name}.conf
|
|
|
|
+sed -i \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ -e 's/@ap_suffix@/%{ap_suffix}/g' \
|
|
|
|
+ %{buildroot}%{apache1_confdir}/%{_name}.conf
|
|
%endif
|
|
%endif
|
|
|
|
|
|
# Install the Apache2 module, CGI SAPI, config fragment
|
|
# Install the Apache2 module, CGI SAPI, config fragment
|
|
%if %{with apache2}
|
|
%if %{with apache2}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_moduledir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_moduledir}
|
|
-%{__install} -m 755 build-apache2/libs/lib%{_name}.so %{buildroot}%{apache2_moduledir}
|
|
|
|
|
|
+%{__install} -m 755 build-apache2/libs/libphp%{ap_suffix}.so %{buildroot}%{apache2_moduledir}/lib%{_name}.so
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_cgidir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_cgidir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_fcgidir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_fcgidir}
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache2_cgidir}/%{_name}-cgi
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache2_cgidir}/%{_name}-cgi
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache2_fcgidir}/%{_name}-fcgi
|
|
ln -sf %{_bindir}/%{_name}-cgi %{buildroot}%{apache2_fcgidir}/%{_name}-fcgi
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_confdir}
|
|
%{__install} -m 755 -d %{buildroot}%{apache2_confdir}
|
|
%{__install} -m 644 %{SOURCE24} %{buildroot}%{apache2_confdir}/%{_name}.conf
|
|
%{__install} -m 644 %{SOURCE24} %{buildroot}%{apache2_confdir}/%{_name}.conf
|
|
|
|
+sed -i \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ -e 's/@ap_suffix@/%{ap_suffix}/g' \
|
|
|
|
+ %{buildroot}%{apache2_confdir}/%{_name}.conf
|
|
%endif
|
|
%endif
|
|
|
|
|
|
# Install the configuration file for Nginx
|
|
# Install the configuration file for Nginx
|
|
mkdir -p %{buildroot}%{_sysconfdir}/nginx
|
|
mkdir -p %{buildroot}%{_sysconfdir}/nginx
|
|
-%{__install} -m 644 %{SOURCE29} %{buildroot}%{_sysconfdir}/nginx/
|
|
|
|
|
|
+%{__install} -m 644 %{SOURCE29} %{buildroot}%{_sysconfdir}/nginx/%{_name}_params
|
|
|
|
+sed -i -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ %{buildroot}%{_sysconfdir}/nginx/%{_name}_params
|
|
|
|
|
|
%{__install} -m 755 -d %{buildroot}%{php_confdir}/php.d
|
|
%{__install} -m 755 -d %{buildroot}%{php_confdir}/php.d
|
|
%{__install} -m 755 -d %{buildroot}%{_localstatedir}/%{_name}
|
|
%{__install} -m 755 -d %{buildroot}%{_localstatedir}/%{_name}
|
|
@@ -775,29 +802,34 @@ rm -f %{buildroot}%{_libdir}/%{_name}/*.a
|
|
# Remove irrelevant docs
|
|
# Remove irrelevant docs
|
|
rm -f README.{Zeus,QNX,CVS-RULES}
|
|
rm -f README.{Zeus,QNX,CVS-RULES}
|
|
|
|
|
|
-# fix symlink for phar.
|
|
|
|
-
|
|
|
|
-%{__rm} -f %{buildroot}%{_bindir}/phar
|
|
|
|
-%{__ln_s} ./phar.phar %{buildroot}%{_bindir}/phar
|
|
|
|
-
|
|
|
|
# ad-hoc fix for incorrect paths to php5
|
|
# ad-hoc fix for incorrect paths to php5
|
|
-for X in pear5 peardev5 pecl5 ; do
|
|
|
|
- sed -e 's|%{buildroot}||g' %{buildroot}%{_bindir}/$X \
|
|
|
|
- > %{buildroot}%{_bindir}/$X.new
|
|
|
|
- mv -f %{buildroot}%{_bindir}/$X.new %{buildroot}%{_bindir}/$X
|
|
|
|
- chmod 0755 %{buildroot}%{_bindir}/$X
|
|
|
|
|
|
+for X in pear%{majorver} peardev%{majorver} pecl%{majorver} ; do
|
|
|
|
+ sed -i -e 's|%{buildroot}||g' %{buildroot}%{_bindir}/$X
|
|
done
|
|
done
|
|
|
|
|
|
PEAPI=`%{_built_php} -n -i | grep 'PHP Extension =>' | sed -e 's/^.* //'`
|
|
PEAPI=`%{_built_php} -n -i | grep 'PHP Extension =>' | sed -e 's/^.* //'`
|
|
ZEAPI=`%{_built_php} -n -i | grep 'Zend Extension =>' | sed -e 's/^.* //'`
|
|
ZEAPI=`%{_built_php} -n -i | grep 'Zend Extension =>' | sed -e 's/^.* //'`
|
|
|
|
|
|
-sed -e "s,@BUILDROOT@,%{buildroot},g" -e "s/@PEAPI@/$PEAPI/g" -e "s/@ZEAPI@/$ZEAPI/g" < %{SOURCE30} > %{__find_provides}
|
|
|
|
|
|
+sed \
|
|
|
|
+ -e "s,@BUILDROOT@,%{buildroot},g" \
|
|
|
|
+ -e 's/@majorver@/%{majorver}/g' \
|
|
|
|
+ -e "s/@PEAPI@/$PEAPI/g" \
|
|
|
|
+ -e "s/@ZEAPI@/$ZEAPI/g" < %{SOURCE30} > %{__find_provides}
|
|
chmod 755 %{__find_provides}
|
|
chmod 755 %{__find_provides}
|
|
|
|
|
|
|
|
+rm -rf %{buildroot}/{.channels,.depdb*,.filemap,.lock}
|
|
|
|
+rm -f %{buildroot}%{_bindir}/{pear,peardev,pecl,phar}
|
|
|
|
+
|
|
#----------------------------------------------------------------------
|
|
#----------------------------------------------------------------------
|
|
%post
|
|
%post
|
|
-/sbin/update-alternatives --install %{_bindir}/php \
|
|
|
|
- php %{_bindir}/php%{majorver} %{majorver}0
|
|
|
|
|
|
+/sbin/update-alternatives \
|
|
|
|
+ --install %{_bindir}/php php %{_bindir}/php%{majorver} %{majorver}0 \
|
|
|
|
+ --slave %{_bindir}/php-cgi php-cgi %{_bindir}/php%{majorver}-cgi \
|
|
|
|
+ --slave %{_bindir}/phar phar %{_bindir}/phar%{majorver}.phar \
|
|
|
|
+ --slave %{_bindir}/phar.phar phar.phar %{_bindir}/phar%{majorver}.phar \
|
|
|
|
+ --slave %{_mandir}/man1/php.1.gz php.1.gz %{_mandir}/man1/%{_name}.1.gz \
|
|
|
|
+ --slave %{_mandir}/man1/php-cgi.1.gz php-cgi.1.gz %{_mandir}/man1/php-cgi%{majorver}.1.gz \
|
|
|
|
+ --slave %{_mandir}/man1/phar.1.gz phar.1.gz %{_mandir}/man1/phar%{majorver}.1.gz
|
|
|
|
|
|
# fix broken symlink if it's there
|
|
# fix broken symlink if it's there
|
|
if [ ! -f %{_bindir}/php ] ; then
|
|
if [ ! -f %{_bindir}/php ] ; then
|
|
@@ -809,45 +841,87 @@ fi
|
|
|
|
|
|
%preun
|
|
%preun
|
|
if [ "$1" = 0 ]; then
|
|
if [ "$1" = 0 ]; then
|
|
- /sbin/update-alternatives --remove php %{_bindir}/php%{majorver}
|
|
|
|
- /sbin/update-alternatives --auto php ||:
|
|
|
|
|
|
+ /sbin/update-alternatives --remove php %{_bindir}/php%{majorver}
|
|
fi
|
|
fi
|
|
|
|
|
|
%post fpm
|
|
%post fpm
|
|
-/sbin/update-alternatives --install %{_sbindir}/php-fpm \
|
|
|
|
- php-fpm %{_sbindir}/php%{majorver}-fpm %{majorver}0
|
|
|
|
|
|
+/sbin/update-alternatives \
|
|
|
|
+ --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/%{_name}-fpm %{majorver}0 \
|
|
|
|
+ --slave %{_mandir}/man8/php-fpm.8.gz php-fpm.8.gz %{_mandir}/man8/%{_name}-fpm.8.gz
|
|
|
|
|
|
# fix broken symlink if it's there
|
|
# fix broken symlink if it's there
|
|
if [ ! -f %{_sbindir}/php-fpm ] ; then
|
|
if [ ! -f %{_sbindir}/php-fpm ] ; then
|
|
/sbin/update-alternatives --auto php-fpm
|
|
/sbin/update-alternatives --auto php-fpm
|
|
fi
|
|
fi
|
|
-/sbin/chkconfig --add php-fpm
|
|
|
|
|
|
+/sbin/chkconfig --add %{_name}-fpm
|
|
|
|
+
|
|
|
|
+%triggerun fpm -- php5-fpm < 5.6.11
|
|
|
|
+/sbin/chkconfig --del php-fpm 2>/dev/null ||:
|
|
|
|
|
|
%preun fpm
|
|
%preun fpm
|
|
if [ "$1" = 0 ]; then
|
|
if [ "$1" = 0 ]; then
|
|
- /sbin/chkconfig --del php-fpm
|
|
|
|
- /sbin/update-alternatives --remove php-fpm %{_sbindir}/php%{majorver}-fpm
|
|
|
|
- /sbin/update-alternatives --auto php-fpm ||:
|
|
|
|
|
|
+ /sbin/chkconfig --del %{_name}-fpm
|
|
|
|
+ /sbin/update-alternatives --remove php-fpm %{_sbindir}/php%{majorver}-fpm
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+%post nginx
|
|
|
|
+/sbin/update-alternatives \
|
|
|
|
+ --install %{_sysconfdir}/nginx/php_params \
|
|
|
|
+ php-nginx \
|
|
|
|
+ %{_sysconfdir}/nginx/%{_name}_params \
|
|
|
|
+ %{majorver}0
|
|
|
|
+
|
|
|
|
+# fix broken symlink if it's there
|
|
|
|
+if [ ! -f %{_sysconfdir}/nginx/php_params ] ; then
|
|
|
|
+ /sbin/update-alternatives --auto php-nginx
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+%preun nginx
|
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
|
+ /sbin/update-alternatives --remove php-nginx %{_sysconfdir}/nginx/%{_name}_params
|
|
fi
|
|
fi
|
|
|
|
|
|
%post pear
|
|
%post pear
|
|
/sbin/update-alternatives \
|
|
/sbin/update-alternatives \
|
|
--install %{_bindir}/pear pear %{_bindir}/pear%{majorver} %{majorver}0 \
|
|
--install %{_bindir}/pear pear %{_bindir}/pear%{majorver} %{majorver}0 \
|
|
--slave %{_bindir}/peardev peardev %{_bindir}/peardev%{majorver} \
|
|
--slave %{_bindir}/peardev peardev %{_bindir}/peardev%{majorver} \
|
|
- --slave %{_bindir}/pecl pecl %{_bindir}/pecl%{majorver}
|
|
|
|
|
|
+ --slave %{_bindir}/pecl pecl %{_bindir}/pecl%{majorver} \
|
|
|
|
+ --slave %{_sysconfdir}/rpm/macros.pear macros.pear %{_datadir}/php%{majorver}/macros.pear
|
|
|
|
+
|
|
|
|
|
|
# fix broken symlink if it's there
|
|
# fix broken symlink if it's there
|
|
if [ ! -f %{_bindir}/pear ] ; then
|
|
if [ ! -f %{_bindir}/pear ] ; then
|
|
/sbin/update-alternatives --auto pear
|
|
/sbin/update-alternatives --auto pear
|
|
fi
|
|
fi
|
|
|
|
|
|
-%triggerpostun pear -- php5-pear < 5.1.4-0vl1
|
|
|
|
-/sbin/update-alternatives --auto pear
|
|
|
|
|
|
+%triggerpostun pear -- php5-pear < 5.6.11
|
|
|
|
+if [ ! -f %{_sysconfdir}/rpm/macros.pear ] ; then
|
|
|
|
+ /sbin/update-alternatives --auto pear
|
|
|
|
+fi
|
|
|
|
|
|
%preun pear
|
|
%preun pear
|
|
-if [ "$1" = "0" ]; then
|
|
|
|
- /sbin/update-alternatives --remove pear %{_bindir}/pear%{majorver}
|
|
|
|
- /sbin/update-alternatives --auto pear ||:
|
|
|
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
|
+ /sbin/update-alternatives --remove pear %{_bindir}/pear%{majorver}
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+%post devel
|
|
|
|
+/sbin/update-alternatives \
|
|
|
|
+ --install %{_bindir}/php-config php-devel %{_bindir}/php-config%{majorver} %{majorver}0 \
|
|
|
|
+ --slave %{_bindir}/phpize phpize %{_bindir}/phpize%{majorver} \
|
|
|
|
+ --slave %{_bindir}/phpextdist phpextdist %{_bindir}/phpextdist%{majorver} \
|
|
|
|
+ --slave %{_bindir}/phpize phpize %{_bindir}/phpize%{majorver} \
|
|
|
|
+ --slave %{_mandir}/man1/php-config.1.gz php-config.1.gz %{_mandir}/man1/php-config%{majorver}.1.gz \
|
|
|
|
+ --slave %{_mandir}/man1/phpize.1.gz phpize.1.gz %{_mandir}/man1/phpize%{majorver}.1.gz
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+# fix broken symlink if it's there
|
|
|
|
+if [ ! -f %{_bindir}/php-config ] ; then
|
|
|
|
+ /sbin/update-alternatives --auto php-config
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+%preun devel
|
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
|
+ /sbin/update-alternatives --remove php-devel %{_bindir}/php-config%{majorver}
|
|
fi
|
|
fi
|
|
|
|
|
|
%if %{?_dist_release} == "vl5"
|
|
%if %{?_dist_release} == "vl5"
|
|
@@ -864,7 +938,7 @@ MPM=`file /etc/alternatives/apache2 | sed -e 's/^.*apache2\.\([a-z]*\).*$/\1/'`
|
|
if [ "$MPM" != "prefork" ]; then
|
|
if [ "$MPM" != "prefork" ]; then
|
|
cat <<EOF
|
|
cat <<EOF
|
|
|
|
|
|
- Apache2 is configured to use $MPM MPM. But php5-apache2 requires
|
|
|
|
|
|
+ Apache2 is configured to use $MPM MPM. But php%{majorver}-apache2 requires
|
|
prefork MPM. Run the following command as root to switch MPM:
|
|
prefork MPM. Run the following command as root to switch MPM:
|
|
|
|
|
|
/sbin/update-alternatives --config apache2
|
|
/sbin/update-alternatives --config apache2
|
|
@@ -878,8 +952,8 @@ MPM=`/usr/sbin/apache2ctl -V | grep "Server MPM:" | sed -e 's/^.*: *//'`
|
|
if [ "$MPM" != "prefork" ]; then
|
|
if [ "$MPM" != "prefork" ]; then
|
|
cat <<EOF
|
|
cat <<EOF
|
|
|
|
|
|
- Apache2 is configured to use $MPM MPM. But php5-apache2 requires
|
|
|
|
-prefork MPM. Configure Apache2 to use prefork MPM or use PHP5-FPM
|
|
|
|
|
|
+ Apache2 is configured to use $MPM MPM. But php%{majorver}-apache2 requires
|
|
|
|
+prefork MPM. Configure Apache2 to use prefork MPM or use PHP%{majorver}-FPM
|
|
via FastCGI.
|
|
via FastCGI.
|
|
|
|
|
|
EOF
|
|
EOF
|
|
@@ -900,11 +974,12 @@ rm -f files.*
|
|
%doc php.ini-{development,production}
|
|
%doc php.ini-{development,production}
|
|
%doc php.gif
|
|
%doc php.gif
|
|
%{_mandir}/man1/%{_name}.1*
|
|
%{_mandir}/man1/%{_name}.1*
|
|
|
|
+%{_mandir}/man1/php-cgi%{majorver}.1*
|
|
|
|
+%{_mandir}/man1/phar%{majorver}.1*
|
|
%config(noreplace) %{php_confdir}/php.ini
|
|
%config(noreplace) %{php_confdir}/php.ini
|
|
%{_bindir}/%{_name}
|
|
%{_bindir}/%{_name}
|
|
%{_bindir}/%{_name}-cgi
|
|
%{_bindir}/%{_name}-cgi
|
|
-%{_bindir}/phar
|
|
|
|
-%{_bindir}/phar.phar
|
|
|
|
|
|
+%{_bindir}/phar%{majorver}.phar
|
|
%dir %{php_confdir}
|
|
%dir %{php_confdir}
|
|
%dir %{php_confdir}/php.d
|
|
%dir %{php_confdir}/php.d
|
|
%dir %{_libdir}/%{_name}
|
|
%dir %{_libdir}/%{_name}
|
|
@@ -917,13 +992,11 @@ rm -f files.*
|
|
|
|
|
|
%files devel
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%{_mandir}/man1/php-config.1*
|
|
|
|
-%{_mandir}/man1/phpize.1*
|
|
|
|
-%{_bindir}/php-config
|
|
|
|
-%{_bindir}/php-config5
|
|
|
|
-%{_bindir}/phpize
|
|
|
|
-%{_bindir}/phpize5
|
|
|
|
-%{_bindir}/phpextdist
|
|
|
|
|
|
+%{_mandir}/man1/php-config%{majorver}.1*
|
|
|
|
+%{_mandir}/man1/phpize%{majorver}.1*
|
|
|
|
+%{_bindir}/php-config%{majorver}
|
|
|
|
+%{_bindir}/phpize%{majorver}
|
|
|
|
+%{_bindir}/phpextdist%{majorver}
|
|
%{_includedir}/%{_name}
|
|
%{_includedir}/%{_name}
|
|
%{_libdir}/%{_name}/build
|
|
%{_libdir}/%{_name}/build
|
|
|
|
|
|
@@ -931,7 +1004,8 @@ rm -f files.*
|
|
%files pear
|
|
%files pear
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%config %{php_confdir}/pear.conf
|
|
%config %{php_confdir}/pear.conf
|
|
-%config %{_sysconfdir}/rpm/macros.pear
|
|
|
|
|
|
+%config %{_datadir}/%{_name}/macros.pear
|
|
|
|
+%config %{_sysconfdir}/rpm/macros.pear%{majorver}
|
|
%{_bindir}/pear%{majorver}
|
|
%{_bindir}/pear%{majorver}
|
|
%{_bindir}/peardev%{majorver}
|
|
%{_bindir}/peardev%{majorver}
|
|
%{_bindir}/pecl%{majorver}
|
|
%{_bindir}/pecl%{majorver}
|
|
@@ -961,16 +1035,16 @@ rm -f files.*
|
|
%files fpm
|
|
%files fpm
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%{_sbindir}/%{_name}-fpm
|
|
%{_sbindir}/%{_name}-fpm
|
|
-%{_initdir}/php-fpm
|
|
|
|
-%{_mandir}/man8/php-fpm.8*
|
|
|
|
|
|
+%{_initdir}/%{_name}-fpm
|
|
|
|
+%{_mandir}/man8/%{_name}-fpm.8*
|
|
%dir %{php_confdir}/fpm.d
|
|
%dir %{php_confdir}/fpm.d
|
|
%config(noreplace) %{php_confdir}/php-fpm.conf
|
|
%config(noreplace) %{php_confdir}/php-fpm.conf
|
|
%config(noreplace) %{php_confdir}/fpm.d/*.conf
|
|
%config(noreplace) %{php_confdir}/fpm.d/*.conf
|
|
-%config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
|
|
|
|
|
|
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{_name}-fpm
|
|
|
|
|
|
%files nginx
|
|
%files nginx
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
-%config(noreplace) %{_sysconfdir}/nginx/php_params
|
|
|
|
|
|
+%config(noreplace) %{_sysconfdir}/nginx/%{_name}_params
|
|
|
|
|
|
%files dba -f files.dba
|
|
%files dba -f files.dba
|
|
%files imap -f files.imap
|
|
%files imap -f files.imap
|
|
@@ -989,6 +1063,10 @@ rm -f files.*
|
|
|
|
|
|
#======================================================================
|
|
#======================================================================
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Fri Jul 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.6.11-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- made alternatives-available.
|
|
|
|
+
|
|
* Fri Jun 12 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.6.10-1
|
|
* Fri Jun 12 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.6.10-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
|
|
|