From c316407703cae13b631415dfc3ca0230c423fd71 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 8 Feb 2017 13:13:20 +0000 Subject: [PATCH] - drop apache1 support, cleanup --- php.spec | 92 ++------------------------------------------------------ 1 file changed, 3 insertions(+), 89 deletions(-) diff --git a/php.spec b/php.spec index 4b8e81d..3942311 100644 --- a/php.spec +++ b/php.spec @@ -35,7 +35,6 @@ %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 @@ -110,7 +109,6 @@ # disable all sapis %if %{with gcov} -%undefine with_apache1 %undefine with_apache2 %undefine with_cgi %undefine with_litespeed @@ -136,12 +134,6 @@ %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 @@ -296,9 +288,6 @@ BuildRequires: t1lib-devel %{?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 @@ -395,24 +384,6 @@ PHP - це мова написання скриптів, що вбудовуют роботи з базами даних є доволі простим. Найбільш популярне використання 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 @@ -2302,9 +2273,6 @@ fpm %if %{with embed} embed %endif -%if %{with apache1} -apxs1 -%endif %if %{with apache2} apxs2 %endif @@ -2334,10 +2302,6 @@ for sapi in $sapis; do 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" @@ -2487,10 +2451,6 @@ cp -af Makefile.cli Makefile %{__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 @@ -2637,13 +2597,6 @@ touch $RPM_BUILD_ROOT%{_mandir}/man1/phar.1 # 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} libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache @@ -2714,10 +2667,7 @@ install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir} 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%{php_suffix} -#cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{php_suffix}.1 +# CLI # touch for ghost touch $RPM_BUILD_ROOT%{_bindir}/php touch $RPM_BUILD_ROOT%{_mandir}/man1/php.1 @@ -2725,12 +2675,6 @@ 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 @@ -2783,26 +2727,9 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c # 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 - %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 @@ -2912,9 +2839,6 @@ if [ ! -e /usr/share/browscap/php_browscap.ini ]; then %{__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 @@ -3021,16 +2945,6 @@ if [ $1 -eq 0 ]; then update-alternatives --remove phar %{_bindir}/phar || : fi -%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} %defattr(644,root,root,755) @@ -3104,7 +3018,7 @@ fi %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini -%if %{with apache1} || %{with apache2} +%if %{with apache2} %attr(755,root,root) %{_libdir}/libphp_common-*.so %endif %dir %{php_extensiondir} @@ -3118,7 +3032,7 @@ fi %attr(755,root,root) %{_bindir}/php-config%{php_suffix} %ghost %{_bindir}/phpize %ghost %{_bindir}/php-config -%if %{with apache1} || %{with apache2} +%if %{with apache2} %attr(755,root,root) %{_libdir}/libphp_common.so %else %attr(755,root,root) %{_libdir}/libphp_common.a -- 2.46.0