use _httpd_moddir macro

This commit is contained in:
Remi Collet 2012-11-14 10:21:15 +01:00
parent b7e61e5ed6
commit a9689b58b8

View File

@ -35,6 +35,7 @@
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %if 0%{?fedora} < 17 && 0%{?rhel} < 7
%global with_zip 0 %global with_zip 0
@ -57,7 +58,7 @@
Summary: PHP scripting language for creating dynamic web sites Summary: PHP scripting language for creating dynamic web sites
Name: php Name: php
Version: 5.4.9 Version: 5.4.9
Release: 0.1.%{rcver}%{?dist} Release: 0.2.%{rcver}%{?dist}
# All files licensed under PHP version 3.01, except # All files licensed under PHP version 3.01, except
# Zend is licensed under Zend # Zend is licensed under Zend
# TSRM is licensed under BSD # TSRM is licensed under BSD
@ -137,7 +138,7 @@ Requires(pre): httpd
# Don't provides extensions, which are not shared library, as .so # Don't provides extensions, which are not shared library, as .so
%{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$}
%{?filter_provides_in: %filter_provides_in %{_libdir}/php-zts/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_libdir}/php-zts/modules/.*\.so$}
%{?filter_provides_in: %filter_provides_in %{_libdir}/httpd/modules/.*\.so$} %{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
%{?filter_setup} %{?filter_setup}
@ -1115,11 +1116,11 @@ install -m 644 php.gif $RPM_BUILD_ROOT%{contentdir}/icons/php.gif
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/php install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/php
# install the DSO # install the DSO
install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules install -m 755 -d $RPM_BUILD_ROOT%{_httpd_moddir}
install -m 755 build-apache/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules install -m 755 build-apache/libs/libphp5.so $RPM_BUILD_ROOT%{_httpd_moddir}
# install the ZTS DSO # install the ZTS DSO
install -m 755 build-zts/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/libphp5-zts.so install -m 755 build-zts/libs/libphp5.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp5-zts.so
# Apache config fragment # Apache config fragment
%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}" %if "%{_httpd_modconfdir}" == "%{_httpd_confdir}"
@ -1303,8 +1304,8 @@ fi
%postun embedded -p /sbin/ldconfig %postun embedded -p /sbin/ldconfig
%files %files
%{_libdir}/httpd/modules/libphp5.so %{_httpd_moddir}/libphp5.so
%{_libdir}/httpd/modules/libphp5-zts.so %{_httpd_moddir}/libphp5-zts.so
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session
%config(noreplace) %{_httpd_confdir}/php.conf %config(noreplace) %{_httpd_confdir}/php.conf
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
@ -1408,7 +1409,10 @@ fi
%changelog %changelog
* Wed Nov 14 2012 Remi Collet <remi@fedoraproject.org> 5.4.9-0.1.RC1 * Wed Nov 14 2012 Remi Collet <rcollet@redhat.com> 5.4.9-0.2.RC1
- use _httpd_moddir macro
* Wed Nov 14 2012 Remi Collet <rcollet@redhat.com> 5.4.9-0.1.RC1
- update to 5.4.9RC1 - update to 5.4.9RC1
- improves php.conf (use FilesMatch + SetHandler) - improves php.conf (use FilesMatch + SetHandler)
- improves filter (httpd module) - improves filter (httpd module)