Skip to content

Instantly share code, notes, and snippets.

@brianlow
Forked from aslam/varnish3.rb
Last active January 7, 2019 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save brianlow/674897ef935c2aae2f6cdae41c17766f to your computer and use it in GitHub Desktop.
Save brianlow/674897ef935c2aae2f6cdae41c17766f to your computer and use it in GitHub Desktop.
Install Varnish-3.0.7 on OSX with homebrew
##
# Install Varnish 3.0.7 on OSX with the following Brew command:
# $> brew install https://gist.github.com/brianlow/674897ef935c2aae2f6cdae41c17766f/raw/varnish.rb
#
# You also might have to run:
# $> sudo brew link varnish3
# To symlink the install.
##
require 'formula'
class Varnish3 <Formula
url 'https://varnish-cache.org/_downloads/varnish-3.0.7.tgz'
homepage 'http://www.varnish-cache.org/'
sha256 'a27e9f11391617fab27cc6edc31d3c8681b8d6975f8c2cd07f6e081bc54c24ce'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build
# needs
skip_clean :all
def install
# http://www.varnish-cache.org/trac/wiki/Installation
# system "./autogen.sh"
system "./configure", "--enable-debugging-symbols",
"--enable-developer-warnings",
"--enable-dependency-tracking",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--localstatedir=#{var}"
system "make"
system "make install"
(var+'varnish3').mkpath
(prefix+'org.varnish-cache.varnishd.plist').write startup_plist
(prefix+'org.varnish-cache.varnishd.plist').chmod 0644
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment