# standard
#
# Conditional build:
-# - packaging options
-%bcond_without alternatives # use alternatives system to select default phar and php-fpm
-%bcond_with default_php # build this PHP as default PHP in system (disables alternatives)
# - General options:
%bcond_without embed # disable building Embedded API
%bcond_with gcov # Enable Code coverage reporting
%bcond_with tests # default off; test process very often hangs on builders, approx run time 45m; perform "make test"
%bcond_with zts # Zend Thread Safety
# - SAPI
-%bcond_with apache1 # disable building Apache 1.3.x SAPI
%bcond_without apache2 # disable building Apache 2.x SAPI
%bcond_without cgi # disable CGI/FCGI SAPI
%bcond_without fpm # disable FPM SAPI
# disable all sapis
%if %{with gcov}
-%undefine with_apache1
%undefine with_apache2
%undefine with_cgi
%undefine with_litespeed
%endif
-%if %{with default_php}
-%undefine with_alternatives
-%endif
-
# mm is not thread safe
%if %{with zts}
%undefine with_mm
%undefine with_fpm
%endif
-%if 0
-%if %{without apache1} && %{without apache2}
-ERROR: You need to select at least one Apache SAPI to build shared modules.
-%endif
-%endif
-
# filter depends on pcre
%if %{without pcre}
%undefine with_filter
%endif
-%define rel 0.1
%define orgname php
-%define ver_suffix 56
-%define php_suffix %{!?with_default_php:%{ver_suffix}}
+%define php_suffix 56
Summary: PHP: Hypertext Preprocessor
Summary(fr.UTF-8): Le langage de script embarque-HTML PHP
Summary(pl.UTF-8): Język skryptowy PHP
Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
-Version: 5.6.30
-Release: %{rel}
+Version: 5.6.40
+Release: 1
Epoch: 4
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
License: PHP 3.01 and Zend and BSD
Group: Libraries
Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 68753955a8964ae49064c6424f81eb3e
+# Source0-md5: c7dde3afb16ce7b761abf2805125d372
Source2: %{orgname}-mod_%{orgname}.conf
Source3: %{orgname}-cgi-fcgi.ini
Source4: %{orgname}-apache.ini
Source14: skip-tests.sh
Patch0: %{orgname}-shared.patch
Patch1: %{orgname}-tld.patch
-Patch2: %{orgname}-mail.patch
Patch3: %{orgname}-link-libs.patch
Patch4: php-bug-71475.patch
Patch5: %{orgname}-filter-shared.patch
Patch18: %{orgname}-nohttpd.patch
Patch21: %{orgname}-dba-link.patch
Patch22: %{orgname}-both-apxs.patch
-Patch23: %{orgname}-builddir.patch
+Patch23: %{orgname}-paths.patch
Patch24: %{orgname}-zlib-for-getimagesize.patch
Patch25: %{orgname}-stupidapache_version.patch
Patch26: %{orgname}-pear.patch
Patch42: %{orgname}-fpm-shared.patch
Patch43: %{orgname}-silent-session-cleanup.patch
Patch44: %{orgname}-include_path.patch
-Patch45: %{orgname}-imap-annotations.patch
-Patch46: %{orgname}-imap-myrights.patch
Patch47: suhosin.patch
Patch50: extension-shared-optional-dep.patch
Patch51: spl-shared.patch
BuildRequires: pam-devel
%{?with_pcre:BuildRequires: pcre-devel >= 8.10}
BuildRequires: pkgconfig
-%{?with_pgsql:BuildRequires: postgresql-backend-devel >= 7.2}
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: readline-devel
%{?with_recode:BuildRequires: recode-devel >= 3.5d-3}
%{?with_odbc:BuildRequires: unixODBC-devel}
%{?with_xmlrpc:BuildRequires: xmlrpc-epi-devel >= 0.54.1}
BuildRequires: zlib-devel >= 1.0.9
-%if %{with apache1}
-BuildRequires: apache1-devel
-%endif
%if %{with apache2}
BuildRequires: apache-devel >= 2.0.52-2
BuildRequires: apr-devel >= 1:1.0.0
%define php_sysconfdir /etc/%{name}
%define php_extensiondir %{_libdir}/%{name}
-%define _sysconfdir %{php_sysconfdir}
+%define php_datadir /usr/share/php/%{name}
+%define _sysconfdir %{php_sysconfdir}
# must be in sync with source. extra check ensuring that it is so is done in %%build
%define php_api_version 20131106
роботи з базами даних є доволі простим. Найбільш популярне
використання PHP - заміна для CGI скриптів.
-%package -n apache1-mod_%{name}
-Summary: PHP DSO module for Apache 1.3.x
-Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 1.3.x
-Group: Development/Languages/PHP
-Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Requires: apache1(EAPI) >= 1.3.33-2
-Requires: apache1-mod_mime
-Provides: webserver(php) = %{version}
-Obsoletes: apache-mod_php < 1:4.1.1
-Obsoletes: apache1-mod_php < 4:5.3.28-7
-Obsoletes: phpfi
-
-%description -n apache1-mod_%{name}
-PHP as DSO module for Apache 1.3.x.
-
-%description -n apache1-mod_%{name} -l pl.UTF-8
-PHP jako moduł DSO (Dynamic Shared Object) dla Apache 1.3.x.
-
%package -n apache-mod_%{name}
Summary: PHP DSO module for Apache 2.x
Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 2.x
Summary(pl.UTF-8): PHP jako interpreter działający z linii poleceń
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Requires: alternatives
Obsoletes: php-cli < 4:5.3.28-7
%description cli
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-%{?with_alternatives:Requires: alternatives}
+Requires: alternatives
Requires: php-dirs >= 1.4-2
Requires: rc-scripts
Provides: php(fcgi)
%{?with_pcre:Requires: pcre-devel >= 8.10}
Requires: shtool
Provides: php-devel = %{epoch}:%{version}-%{release}
-Obsoletes: php-devel
Obsoletes: php-pear-devel
Obsoletes: php4-devel
Obsoletes: php52-devel
Obsoletes: php53-devel
Obsoletes: php54-devel
Obsoletes: php55-devel
-Obsoletes: php70-devel
-Obsoletes: php71-devel
%description devel
The php-devel package lets you compile dynamic extensions to PHP.
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-hash = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
-%{?with_alternatives:Requires: alternatives}
+Requires: alternatives
Suggests: %{name}-cli
# zlib is required by phar program, but as phar cli is optional should the dep be too
Suggests: %{name}-zlib
cp -p php.ini-production php.ini
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%endif
%patch43 -p1
%patch44 -p1
-#%patch45 -p1 # imap annotations. fixme
-#%patch46 -p1 # imap myrights. fixme
%if %{with suhosin}
%patch47 -p1
%endif
%if %{with embed}
embed
%endif
-%if %{with apache1}
-apxs1
-%endif
%if %{with apache2}
apxs2
%endif
embed)
sapi_args='--disable-cli --disable-cgi --enable-embed'
;;
- apxs1)
- ver=$(rpm -q --qf '%{V}' apache1-devel)
- sapi_args="--disable-cli --disable-cgi --with-apxs=%{apxs1} --with-apache-version=$ver"
- ;;
apxs2)
ver=$(rpm -q --qf '%{V}' apache-devel)
sapi_args="--disable-cli --disable-cgi --with-apxs2=%{apxs2} --with-apache-version=$ver"
%configure \
EXTRA_LDFLAGS="%{rpmldflags}" \
+ --program-suffix=%{php_suffix} \
$sapi_args \
%if "%{!?configure_cache:0}%{?configure_cache}" == "0"
--cache-file=config.cache \
%endif
+ --datadir=%{php_datadir} \
--with-libdir=%{_lib} \
--with-config-file-path=%{_sysconfdir} \
--with-config-file-scan-dir=%{_sysconfdir}/conf.d \
cp -f main/php_config.h php_config.h.$sapi
cp -f config.log config.log.$sapi
done
-
# as we build each SAPI in own make, adjust php-config.in forehead
sapis=$(%{__sed} -rne 's/^PHP_INSTALLED_SAPIS = (.+)/\1/p' Makefile.* | tr ' ' '\n' | sort -u | xargs)
%{__sed} -i -e "s,@PHP_INSTALLED_SAPIS@,$sapis," scripts/php-config.in
%{__make} build-modules \
MYSQLND_SHARED_LIBADD="-lssl -lcrypto"
-%if %{with apache1}
-%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1
-%endif
-
%if %{with apache2}
%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache2handler/libphp5.la -f Makefile.apxs2
%endif
phpbuilddir=%{_libdir}/%{name}/build \
INSTALL_ROOT=$RPM_BUILD_ROOT
-%if %{without default_php}
# version the .phar files
%{__mv} $RPM_BUILD_ROOT%{_bindir}/phar{,%{php_suffix}}.phar
%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/phar{,%{php_suffix}}.1
-%endif
-%if %{with alternatives}
# touch for ghost
%{__rm} $RPM_BUILD_ROOT%{_bindir}/phar
touch $RPM_BUILD_ROOT%{_bindir}/phar
touch $RPM_BUILD_ROOT%{_mandir}/man1/phar.1
-%endif
# version suffix
v=$(echo %{version} | cut -d. -f1-2)
-# install Apache1 DSO module
-%if %{with apache1}
-libtool --mode=install install -p sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache1
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-$v}.so
-ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/mod_php.so
-%endif
-
# install Apache2 DSO module
%if %{with apache2}
+# versioned libphp
libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so
-ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.so
+sed -i -e "s|libphp5|libphp%{php_suffix}|g" $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la
+ln -s libphp%{php_suffix}.so $RPM_BUILD_ROOT%{_libdir}/apache/mod_php.so
%endif
# install litespeed sapi
%{__make} -f Makefile.phpdbg install-phpdbg \
INSTALL="libtool --mode=install install -p" \
INSTALL_ROOT=$RPM_BUILD_ROOT
-
-%if %{without default_php}
-# version the phpdbg files
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/phpdbg{,%{ver_suffix}}
-%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/phpdbg{,%{ver_suffix}}.1
-%endif
%endif
+# touch for ghost
+touch $RPM_BUILD_ROOT%{_bindir}/phpize
+touch $RPM_BUILD_ROOT%{_mandir}/man1/phpize.1
+touch $RPM_BUILD_ROOT%{_bindir}/php-config
+touch $RPM_BUILD_ROOT%{_mandir}/man1/php-config.1
+
%if %{with milter}
%{__make} -f Makefile.milter install-milter \
INSTALL_ROOT=$RPM_BUILD_ROOT
%endif
+# versioned libphp_common
libtool --mode=install install -p libphp_common.la $RPM_BUILD_ROOT%{_libdir}
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libphp_common.la $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libphp_common-%{version}.so $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}-%{version}.so
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/libphp_common.so
+ln -s libphp_common%{php_suffix}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.so
+sed -i -e "s|libphp_common|libphp_common%{php_suffix}|g" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la
# install CGI/FCGI
%if %{with cgi}
install -d $RPM_BUILD_ROOT/etc/logrotate.d
cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
-%if %{with alternatives}
# touch for ghost for alternatives
touch $RPM_BUILD_ROOT%{_sbindir}/php-fpm
-%endif
%{__sed} -i -e '
s#/usr/lib/php#%{php_extensiondir}#g
%if %{with embed}
# we could use install-headers from Makefile.embed, but that would reinstall all headers
# install-sapi installs to wrong dir, so just do it all manually
-install -d $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
-install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}
-cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
+install -d $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/sapi/embed
+install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/libphp%{php_suffix}.so
+cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/sapi/embed
%endif
-# install CLI
-# versioned suffix is always installed
-libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{ver_suffix}
-cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{ver_suffix}.1
-echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
-ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
+# CLI
+libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{php_suffix}
+# touch for ghost
+touch $RPM_BUILD_ROOT%{_bindir}/php
+touch $RPM_BUILD_ROOT%{_mandir}/man1/php.1
cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
-%if %{with apache1}
-cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf
-cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache.ini
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.la
-%endif
-
%if %{with apache2}
cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/conf.d/70_mod_php.conf
cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-apache2handler.ini
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.la
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/apache/libphp%{php_suffix}.la
%endif
# ensure that paths are correct for current php version and arch
ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build
break
done
-sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize
+sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize%{php_suffix}
# for php-pecl-mailparse
-install -d $RPM_BUILD_ROOT%{_includedir}/php/ext/mbstring
-cp -p ext/mbstring/libmbfl/mbfl/*.h $RPM_BUILD_ROOT%{_includedir}/php/ext/mbstring
+install -d $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/ext/mbstring
+cp -p ext/mbstring/libmbfl/mbfl/*.h $RPM_BUILD_ROOT%{_includedir}/php/php%{php_suffix}/ext/mbstring
# tests
-install -d $RPM_BUILD_ROOT%{php_data_dir}/tests/php
-install -p run-tests.php $RPM_BUILD_ROOT%{php_data_dir}/tests/php/run-tests.php
-cp -a tests/* $RPM_BUILD_ROOT%{php_data_dir}/tests/php
+install -d $RPM_BUILD_ROOT%{php_datadir}/tests/php
+install -p run-tests.php $RPM_BUILD_ROOT%{php_datadir}/tests/php/run-tests.php
+cp -a tests/* $RPM_BUILD_ROOT%{php_datadir}/tests/php
# fix install paths, avoid evil rpaths
-sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la
+sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la
# better solution?
-sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
-
-# somewhy there are installed static versions we don't use
-%if %{with apache1} || %{with apache2}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/apache*/libphp*.a
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libphp*.a
-%{__rm} $RPM_BUILD_ROOT%{php_extensiondir}/*.a
-%endif
+sed -i -e 's|libphp_common.la|$(libdir)/libphp_common%{php_suffix}.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
%clean
rm -rf $RPM_BUILD_ROOT
-%post -n apache1-mod_%{name}
-if [ "$1" = "1" ]; then
- %service -q apache restart
-fi
-
-%postun -n apache1-mod_%{name}
-if [ "$1" = "0" ]; then
- %service -q apache restart
-fi
-
%post -n apache-mod_%{name}
if [ "$1" = "1" ]; then
%service -q httpd restart
%service -q httpd restart
fi
+%post cli
+update-alternatives \
+ --install %{_bindir}/php php %{_bindir}/php%{php_suffix} %{php_suffix} \
+ --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || :
+
+%postun cli
+if [ $1 -eq 0 ]; then
+ update-alternatives --remove php %{_bindir}/php%{php_suffix} || :
+fi
+
+%post common -p /sbin/ldconfig
+%postun common -p /sbin/ldconfig
+
+%post devel
+update-alternatives \
+ --install %{_bindir}/phpize phpize %{_bindir}/phpize%{php_suffix} %{php_suffix} \
+ --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || :
+update-alternatives \
+ --install %{_bindir}/php-config php-config %{_bindir}/php-config%{php_suffix} %{php_suffix} \
+ --slave %{_mandir}/man1/php.1 php.1 %{_mandir}/man1/php%{php_suffix}.1* || :
+
+%postun devel
+if [ $1 -eq 0 ]; then
+ update-alternatives --remove phpize %{_bindir}/phpize%{php_suffix} || :
+ update-alternatives --remove php-config %{_bindir}/php-config%{php_suffix} || :
+fi
+
%pre fpm
%useradd -u 51 -r -s /bin/false -c "HTTP User" -g http http
%post fpm
/sbin/chkconfig --add %{name}-fpm
%service %{name}-fpm restart
-%if %{with alternatives}
-update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{ver_suffix}-fpm %{ver_suffix} || :
-%endif
+update-alternatives --install %{_sbindir}/php-fpm php-fpm %{_sbindir}/php%{php_suffix}-fpm %{php_suffix} || :
%preun fpm
if [ "$1" = "0" ]; then
%service %{name}-fpm stop
/sbin/chkconfig --del %{name}-fpm
-%if %{with alternatives}
- update-alternatives --remove php-fpm %{_sbindir}/php-fpm || :
-%endif
+ update-alternatives --remove php-fpm %{_sbindir}/php%{php_suffix}-fpm || :
fi
%postun fpm
%{__sed} -i -e 's#^browscap = /usr/share/browscap/php_browscap.ini#;&#' %{_sysconfdir}/php.ini
fi
-%triggerpostun -n apache1-mod_%{name} -- apache1-mod_%{name} < 4:5.6.14-2
-sed -i -e 's#modules/libphp5.so#modules/mod_php.so#g' /etc/apache/conf.d/*_mod_php.conf
-
%triggerpostun -n apache-mod_%{name} -- apache-mod_%{name} < 4:5.6.14-2
sed -i -e 's#modules/libphp[57].so#modules/mod_php.so#g' /etc/httpd/conf.d/*_mod_php.conf
%post phar
%ext_post
-%if %{with alternatives}
update-alternatives \
- --install %{_bindir}/phar phar %{_bindir}/phar%{ver_suffix}.phar %{ver_suffix} \
- --slave %{_mandir}/man1/phar.1 phar.1 %{_mandir}/man1/phar%{ver_suffix}.1* || :
-%endif
+ --install %{_bindir}/phar phar %{_bindir}/phar%{php_suffix}.phar %{php_suffix} \
+ --slave %{_mandir}/man1/phar.1 phar.1 %{_mandir}/man1/phar%{php_suffix}.1* || :
%postun phar
%ext_postun
-%if %{with alternatives}
if [ $1 -eq 0 ]; then
- update-alternatives --remove phar %{_bindir}/phar || :
+ update-alternatives --remove phar %{_bindir}/phar%{php_suffix}.phar || :
fi
-%endif
-
-%if %{with apache1}
-%files -n apache1-mod_%{name}
-%defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/apache/conf.d/*_mod_php.conf
-%dir %{_sysconfdir}/apache.d
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
-%attr(755,root,root) %{_libdir}/apache1/mod_php.so
-%attr(755,root,root) %{_libdir}/apache1/libphp5-*.*.so
-%endif
%if %{with apache2}
%files -n apache-mod_%{name}
%dir %{_sysconfdir}/apache2handler.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
%attr(755,root,root) %{_libdir}/apache/mod_php.so
-%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
+%attr(755,root,root) %{_libdir}/apache/libphp%{php_suffix}.so
%endif
%if %{with litespeed}
%if %{with embed}
%files embedded
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libphp5.so
+%attr(755,root,root) %{_libdir}/libphp%{php_suffix}.so
%endif
%files cli
%defattr(644,root,root,755)
%dir %{_sysconfdir}/cli.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini
-%attr(755,root,root) %{_bindir}/php%{ver_suffix}
-%{_mandir}/man1/php%{ver_suffix}.1*
+%attr(755,root,root) %{_bindir}/php%{php_suffix}
+%{_mandir}/man1/php%{php_suffix}.1*
+%ghost %{_bindir}/php
+%ghost %{_mandir}/man1/php.1*
%if %{with fpm}
%files fpm
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpm.d/www.conf
%attr(755,root,root) %{_sbindir}/%{name}-fpm
-%if %{with alternatives}
%ghost %{_sbindir}/php-fpm
-%endif
%{_mandir}/man8/%{name}-fpm.8*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-fpm
%attr(754,root,root) /etc/rc.d/init.d/%{name}-fpm
%dir %{_sysconfdir}
%dir %{_sysconfdir}/conf.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
-%if %{with apache1} || %{with apache2}
-%attr(755,root,root) %{_libdir}/libphp_common-*.so
-%endif
+%attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}-*.so
+%dir %{php_datadir}
%dir %{php_extensiondir}
%doc ext/session/mod_files.sh
%files devel
%defattr(644,root,root,755)
%doc CODING_STANDARDS README.{EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,TESTING2,UNIX-BUILD-SYSTEM,input_filter}
-%attr(755,root,root) %{_bindir}/phpize
-%attr(755,root,root) %{_bindir}/php-config
-%if %{with apache1} || %{with apache2}
-%attr(755,root,root) %{_libdir}/libphp_common.so
-%else
-%attr(755,root,root) %{_libdir}/libphp_common.a
-%endif
-%{_libdir}/libphp_common.la
-%{_includedir}/php
+%attr(755,root,root) %{_bindir}/phpize%{php_suffix}
+%attr(755,root,root) %{_bindir}/php-config%{php_suffix}
+%ghost %{_bindir}/phpize
+%ghost %{_bindir}/php-config
+%attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}.so
+%{_libdir}/libphp_common%{php_suffix}.la
+%{_includedir}/php/php%{php_suffix}
%{_libdir}/%{name}/build
-%{_mandir}/man1/php-config.1*
-%{_mandir}/man1/phpize.1*
+%{_mandir}/man1/php-config%{php_suffix}.1*
+%ghost %{_mandir}/man1/php-config.1*
+%{_mandir}/man1/phpize%{php_suffix}.1*
+%ghost %{_mandir}/man1/phpize.1*
%if %{with bcmath}
%files bcmath
%attr(755,root,root) %{_bindir}/phar%{php_suffix}.phar
%{_mandir}/man1/phar%{php_suffix}.1*
%{_mandir}/man1/phar.phar.1*
-%if %{with alternatives}
%ghost %{_bindir}/phar
-%ghost %{_mandir}/man1/phar.1
-%else
-%attr(755,root,root) %{_bindir}/phar
-%endif
+%ghost %{_mandir}/man1/phar.1*
%endif
%if %{with posix}
%files tests
%defattr(644,root,root,755)
-%dir %{php_data_dir}/tests
-%dir %{php_data_dir}/tests/php
-%{php_data_dir}/tests/php/basic
-%{php_data_dir}/tests/php/classes
-%{php_data_dir}/tests/php/func
-%{php_data_dir}/tests/php/lang
-%{php_data_dir}/tests/php/output
-%{php_data_dir}/tests/php/run-test
-%{php_data_dir}/tests/php/security
-%{php_data_dir}/tests/php/strings
-%{php_data_dir}/tests/php/quicktester.inc
-%attr(755,root,root) %{php_data_dir}/tests/php/run-tests.php
+%dir %{php_datadir}/tests
+%dir %{php_datadir}/tests/php
+%{php_datadir}/tests/php/basic
+%{php_datadir}/tests/php/classes
+%{php_datadir}/tests/php/func
+%{php_datadir}/tests/php/lang
+%{php_datadir}/tests/php/output
+%{php_datadir}/tests/php/run-test
+%{php_datadir}/tests/php/security
+%{php_datadir}/tests/php/strings
+%{php_datadir}/tests/php/quicktester.inc
+%attr(755,root,root) %{php_datadir}/tests/php/run-tests.php
%if %{with tidy}
%files tidy