diff options
| author | Adam Vandenberg | 2010-02-01 10:48:01 -0800 | 
|---|---|---|
| committer | Adam Vandenberg | 2010-02-01 10:48:01 -0800 | 
| commit | b2d5e3625b964e70a934de51b98f4e57b656faf4 (patch) | |
| tree | e6e67b7c10fc26b494bafe6b883c67ce54866bb0 /Library/Formula/nginx.rb | |
| parent | ca1c2aa7fedcbb04bb1013ef697b5dcc2958fe92 (diff) | |
| download | homebrew-b2d5e3625b964e70a934de51b98f4e57b656faf4.tar.bz2 | |
Updated nginix formula.
* Keep empty logs folder.
* Comment what the patch does.
Diffstat (limited to 'Library/Formula/nginx.rb')
| -rw-r--r-- | Library/Formula/nginx.rb | 50 | 
1 files changed, 27 insertions, 23 deletions
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb index 59aa51d85..a7711a0fe 100644 --- a/Library/Formula/nginx.rb +++ b/Library/Formula/nginx.rb @@ -1,13 +1,17 @@  require 'formula'  class Nginx < Formula -  @url='http://sysoev.ru/nginx/nginx-0.7.64.tar.gz' -  @homepage='http://nginx.net/' -  @md5='cfa97c0f784532820110b5eee57fef6d' +  url 'http://sysoev.ru/nginx/nginx-0.7.64.tar.gz' +  md5 'cfa97c0f784532820110b5eee57fef6d' +  homepage 'http://nginx.net/'    depends_on 'pcre' +   +  skip_clean 'logs'    def patches +    # Changes default port to 8080 +    # Adds code to detect PCRE installed in a non-standard HOMEBREW_PREFIX      DATA    end @@ -16,6 +20,19 @@ class Nginx < Formula        ['--with-passenger', "Compile with support for Phusion Passenger module"]      ]    end +   +  def passenger_config_args +      passenger_root = `passenger-config --root`.chomp +       +      if File.directory?(passenger_root) +        return "--add-module=#{passenger_root}/ext/nginx" +      end +       +      puts "Unable to install nginx with passenger support. The passenger" +      puts "gem must be installed and passenger-config must be in your path" +      puts "in order to continue." +      exit +  end    def install      configure_args = [ @@ -23,33 +40,20 @@ class Nginx < Formula        "--with-http_ssl_module"      ] -    if ARGV.include? '--with-passenger' -      passenger_root = `passenger-config --root`.chomp -       -      if File.directory?(passenger_root) -        configure_args << "--add-module=#{passenger_root}/ext/nginx" -      else -        puts "Unable to install nginx with passenger support. The passenger" -        puts "gem must be installed and passenger-config must be in your path" -        puts "in order to continue." -        exit -      end -    end +    configure_args << passenger_config_args if ARGV.include? '--with-passenger'      system "./configure", *configure_args      system "make install" -     -    # FIXME: This fails, for an unknown reason -    #(prefix+'logs').mkdir    end    def caveats      <<-CAVEATS -You need to create a logs folder before you can run NginX. Also, in the -interest of allowing you to run `nginx` without `sudo`, the default port is -set to localhost:8080; if you want to host pages on your local machine to the -public, you should probably change that to localhost:80, and run `nginx` with -`sudo`. +In the interest of allowing you to run `nginx` without `sudo`, the default  +port is set to localhost:8080. + +If you want to host pages on your local machine to the public, you should +change that to localhost:80, and run `sudo nginx`. You'll need to turn off +any other web servers running port 80, of course.      CAVEATS    end  end  | 
