Browse Source

update to 1.2.2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@6601 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 11 years ago
parent
commit
a4ab0be7a1
1 changed files with 18 additions and 8 deletions
  1. 18 8
      n/nginx/nginx-vl.spec

+ 18 - 8
n/nginx/nginx-vl.spec

@@ -1,7 +1,11 @@
 # build mod_wsgi
 %bcond_with wsgi
 
+%if "%{_dist_release}" > "vl6"
+%define nginx_user      www-data
+%else
 %define nginx_user      nginx
+%endif
 %define nginx_group     %{nginx_user}
 %define nginx_home      %{_localstatedir}/lib/nginx
 %define nginx_home_tmp  %{nginx_home}/tmp
@@ -14,7 +18,7 @@
 Summary:        Robust, small and high performance http and reverse proxy server
 Summary(ja):    堅牢・軽量・高性能な HTTP およびリバースプロキシサーバ
 Name:           nginx
-Version:        1.2.0
+Version:        1.2.2
 Release:        1%{?_dist_release}
 
 Group:          System Environment/Daemons   
@@ -79,6 +83,9 @@ Requires(post):     chkconfig
 # for /sbin/service
 Requires(preun):    chkconfig, initscripts
 Requires(postun):   initscripts
+%if "%{_dist_release}" > "vl6"
+Requires(pre):	    www-common
+%endif
 
 Provides: webserver
 
@@ -243,8 +250,8 @@ chmod 0755 %{buildroot}%{_sbindir}/nginx.*
 %{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/sites.d
 %{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{nginx_confdir}/sites.d/virtual.conf.template
 %{__install} -p -m 0644 %{SOURCE4} %{buildroot}%{nginx_confdir}/conf.d/ssl.conf
-%{__install} -p -m 0644 %{SOURCE10} %{buildroot}%{nginx_confdir}/nginx.conf
-%{__install} -p -m 0644 %{SOURCE10} %{buildroot}%{nginx_confdir}/nginx.conf.default
+%{__sed} -e 's/__NGINXUSER__/%{nginx_user}/g' %{SOURCE10} > %{buildroot}%{nginx_confdir}/nginx.conf
+%{__cp} %{buildroot}%{nginx_confdir}/nginx.conf %{buildroot}%{nginx_confdir}/nginx.conf.default
 %{__install} -p -m 0644 %{SOURCE11} %{buildroot}%{nginx_confdir}/sites.d/default
 %{__install} -p -m 0644 %{SOURCE20} %{buildroot}%{nginx_confdir}/conf.d/proxy_cache.conf
 %{__install} -p -d -m 0755 %{buildroot}%{nginx_home_cache}
@@ -280,11 +287,6 @@ done
 %clean
 rm -rf %{buildroot}
 
-%pre
-if [ $1 == 1 ]; then
-    %{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || :
-fi
-
 %post
 if [ $1 == 1 ]; then
     /sbin/chkconfig --add %{name}
@@ -367,6 +369,14 @@ fi
 
 
 %changelog
+* Thu Jul 19 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.2-1
+- update to 1.2.2
+
+* Thu Jun 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.1-1
+- update to 1.2.1
+- change nginx user from nginx to www-data
+- R(pre): www-common
+
 * Wed Apr 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-1
 - update to 1.2.0
 - update passenger to 3.0.12