Skip to content

Instantly share code, notes, and snippets.

@cellis
Forked from brianlow/varnish3.rb
Created January 10, 2018 20:25
Show Gist options
  • Save cellis/dcbb846e4e19199d17b59b4170a1f1a1 to your computer and use it in GitHub Desktop.
Save cellis/dcbb846e4e19199d17b59b4170a1f1a1 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