nginx: use #{var}/run for state dirs, not cellar

Closes Homebrew/homebrew#15194.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Nick Stenning 2012-09-29 13:41:21 +01:00 committed by Adam Vandenberg
parent 0fb57a93be
commit 0f35f0e888

View file

@ -25,16 +25,16 @@ class Nginx < Formula
end end
def passenger_config_args def passenger_config_args
passenger_root = `passenger-config --root`.chomp passenger_root = `passenger-config --root`.chomp
if File.directory?(passenger_root) if File.directory?(passenger_root)
return "--add-module=#{passenger_root}/ext/nginx" return "--add-module=#{passenger_root}/ext/nginx"
end end
puts "Unable to install nginx with passenger support. The passenger" puts "Unable to install nginx with passenger support. The passenger"
puts "gem must be installed and passenger-config must be in your path" puts "gem must be installed and passenger-config must be in your path"
puts "in order to continue." puts "in order to continue."
exit exit
end end
def install def install
@ -46,7 +46,12 @@ class Nginx < Formula
"--with-ld-opt=-L#{HOMEBREW_PREFIX}/lib", "--with-ld-opt=-L#{HOMEBREW_PREFIX}/lib",
"--conf-path=#{etc}/nginx/nginx.conf", "--conf-path=#{etc}/nginx/nginx.conf",
"--pid-path=#{var}/run/nginx.pid", "--pid-path=#{var}/run/nginx.pid",
"--lock-path=#{var}/nginx/nginx.lock"] "--lock-path=#{var}/run/nginx.lock",
"--http-client-body-temp-path=#{var}/run/nginx/client_body_temp",
"--http-proxy-temp-path=#{var}/run/nginx/proxy_temp",
"--http-fastcgi-temp-path=#{var}/run/nginx/fastcgi_temp",
"--http-uwsgi-temp-path=#{var}/run/nginx/uwsgi_temp",
"--http-scgi-temp-path=#{var}/run/nginx/scgi_temp"]
args << passenger_config_args if build.include? 'with-passenger' args << passenger_config_args if build.include? 'with-passenger'
args << "--with-http_dav_module" if build.include? 'with-webdav' args << "--with-http_dav_module" if build.include? 'with-webdav'
@ -55,6 +60,7 @@ class Nginx < Formula
system "make" system "make"
system "make install" system "make install"
man8.install "objs/nginx.8" man8.install "objs/nginx.8"
(var/'run/nginx').mkpath
end end
def caveats; <<-EOS.undent def caveats; <<-EOS.undent