Browse Source

php5-5.3.16-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@6731 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 11 years ago
parent
commit
aaaa2cdbcd
1 changed files with 36 additions and 5 deletions
  1. 36 5
      p/php5/php5-vl.spec

+ 36 - 5
p/php5/php5-vl.spec

@@ -26,6 +26,18 @@
 %global apache2_cgidir %{apache2_contentdir}/cgi-bin
 %global apache2_fcgidir %{apache2_contentdir}/fcgi-bin
 
+%if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
+%define www_user apache
+%define www_group apache
+%define fpm_user nobody
+%define fpm_group nobody
+%else
+%define www_user www-data
+%define www_group www-data
+%define fpm_user www-data
+%define fpm_group www-data
+%endif
+
 %define _use_internal_dependency_generator 0
 %define __find_provides %{_builddir}/php-%{version}/find-provides.sh
 %define _built_php %{buildroot}%{_bindir}/php5
@@ -33,7 +45,7 @@
 Name: php5
 Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
 Summary(ja): HTML 埋め込み型スクリプト言語 PHP
-Version: 5.3.14
+Version: 5.3.16
 Release: 1%{_dist_release}
 
 Vendor: Project Vine
@@ -55,7 +67,7 @@ Source23: php5.conf-apache1
 Source24: php5.conf-apache2
 Source25: php-fpm.init
 Source26: php-fpm.conf
-Source27: default-pool.conf
+Source27: default-pool.conf.in
 Source28: php-fpm.logrotate
 Source29: php_params
 Source30: find-provides.sh.in
@@ -109,6 +121,12 @@ BuildRequires: libicu-devel >= 3.6
 %if %{?_dist_release} != "vl4"
 BuildRequires: krb5-devel
 %endif
+
+%if %{?_dist_release} != "vl5" && %{?_dist_release} != "vl6"
+BuildRequires: www-common
+Requires: www-common
+%endif
+
 Requires(post,preun): alternatives
 %{?_with_pear:Requires: %{name}-pear = %{version}-%{release}}
 Conflicts: php <= 4.4.2-0vl1.2
@@ -438,7 +456,7 @@ used within a web server environment.
 
 # Prevent %%doc confusion over LICENSE files
 cp Zend/LICENSE Zend/ZEND_LICENSE
-cp Zend/ChangeLog Zend/ZEND_ChangeLog
+#cp Zend/ChangeLog Zend/ZEND_ChangeLog
 cp TSRM/LICENSE TSRM_LICENSE
 
 mkdir -p %{_name}-apache2
@@ -535,6 +553,8 @@ build \
   --enable-fpm
 popd
 
+sed -e 's/@WWWUSER@/%{fpm_user}/' -e 's/@WWWGROUP@/%{fpm_group}/' < %{SOURCE27} > default-pool.conf
+
 #----------------------------------------------------------------------
 # Build Apache1 module
 %if %{?_dist_release} == "vl5"
@@ -626,7 +646,7 @@ mv %{buildroot}%{_bindir}/php-cgi%{majorver} %{buildroot}%{_bindir}/%{_name}-cgi
 %{__install} -m 755 %{SOURCE25} %{buildroot}%{_initdir}/php-fpm
 %{__install} -m 644 build-fpm/sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/
 %{__install} -m 644 %{SOURCE26} %{buildroot}%{php_confdir}/
-%{__install} -m 644 %{SOURCE27} %{buildroot}%{php_confdir}/fpm.d/
+%{__install} -m 644 default-pool.conf %{buildroot}%{php_confdir}/fpm.d/default-pool.conf
 %{__install} -m 644 %{SOURCE28} %{buildroot}%{_sysconfdir}/logrotate.d/php-fpm
 
 
@@ -795,7 +815,9 @@ chown root:apache %{_localstatedir}/%{_name}/session 2>/dev/null || true
 
 %if %{with apache2}
 %post apache2
+%if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
 chown root:apache %{_localstatedir}/%{_name}/session 2>/dev/null || true
+%endif
 
 MPM=`file /etc/alternatives/apache2 | sed -e 's/^.*apache2\.\([a-z]*\).*$/\1/'`
 if [ "$MPM" != "prefork" ]; then
@@ -832,7 +854,7 @@ rm -f files.*
 %dir %{_libdir}/%{_name}
 %dir %{_libdir}/%{_name}/bin
 %dir %{_localstatedir}/%{_name}
-%attr(0770,root,apache) %dir %{_localstatedir}/%{_name}/session
+%attr(0770,root,%{www_group}) %dir %{_localstatedir}/%{_name}/session
 
 %files devel
 %defattr(-,root,root)
@@ -907,6 +929,15 @@ rm -f files.*
 
 #======================================================================
 %changelog
+* Fri Aug 17 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.16-1
+- new upstream release.
+
+* Sat Jul 21 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.15-2
+- owner of /var/www/session was changed to "www-data".
+
+* Fri Jul 20 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.15-1
+- new upstream release.
+
 * Fri Jun 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.14-1
 - new upstream release.