diff options
| author | Dominyk Tiller | 2015-01-04 08:22:45 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-25 16:37:38 +0000 |
| commit | 780f135630261fcf450e9c7428979b5aa2cd7990 (patch) | |
| tree | aa71e50cac05ac48b5a74cc0eb294f6e5c821cb7 /Library/Formula | |
| parent | d52e8b6104666b31379ddc339c4ff62451d7e2ee (diff) | |
| download | homebrew-780f135630261fcf450e9c7428979b5aa2cd7990.tar.bz2 | |
stunnel 5.10
Version bump.
Various configure tweaks, an additional caveat line, and a test
Closes #35535.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/stunnel.rb | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/Library/Formula/stunnel.rb b/Library/Formula/stunnel.rb index 647c59856..b912b83ba 100644 --- a/Library/Formula/stunnel.rb +++ b/Library/Formula/stunnel.rb @@ -1,10 +1,8 @@ -require "formula" - class Stunnel < Formula homepage "https://www.stunnel.org/" - url "https://www.stunnel.org/downloads/stunnel-5.08.tar.gz" - mirror "http://www.usenix.org.uk/mirrors/stunnel/stunnel-5.08.tar.gz" - sha256 "830b21d24cd237e96f4d7993be43553d4eba4d3cfa2660faa78dec8d41d314fc" + url "https://www.stunnel.org/downloads/stunnel-5.10.tar.gz" + mirror "http://www.usenix.org.uk/mirrors/stunnel/stunnel-5.10.tar.gz" + sha256 "032bfc1854f8a0b9e452343c36ec6b52c7e0daef0863423c6b13a61a7c92eb23" bottle do sha1 "aab0c4a1dcdfcdfdac9d9b9c06fda6b1933475af" => :yosemite @@ -12,6 +10,8 @@ class Stunnel < Formula sha1 "48d18d655dd0a75a28488cc9c244ee6d99c55849" => :mountain_lion end + # Please revision me whenever OpenSSL is updated + # "Update OpenSSL shared libraries or rebuild stunnel" depends_on "openssl" def install @@ -20,7 +20,7 @@ class Stunnel < Formula stunnel_cnf.unlink stunnel_cnf.write <<-EOS.undent # OpenSSL configuration file to create a server certificate - # by Michal Trojnara 1998-2013 + # by Michal Trojnara 1998-2015 [ req ] # the default key length is secure and quite fast - do not change it @@ -51,10 +51,13 @@ class Stunnel < Formula EOS system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", "--prefix=#{prefix}", "--sysconfdir=#{etc}", + "--localstatedir=#{var}", "--mandir=#{man}", "--disable-libwrap", + "--disable-systemd", "--with-ssl=#{Formula["openssl"].opt_prefix}" system "make", "install", "cert" end @@ -65,9 +68,29 @@ class Stunnel < Formula #{etc}/stunnel/stunnel.pem This certificate will be used by default unless a config file says otherwise! + Stunnel will refuse to load the sample configuration file if left unedited. In your stunnel configuration, specify a SSL certificate with the "cert =" option for each service. EOS end + + test do + (testpath/"tstunnel.conf").write <<-EOS.undent + cert = #{etc}/stunnel/stunnel.pem + + setuid = nobody + setgid = nobody + + [pop3s] + accept = 995 + connect = 110 + + [imaps] + accept = 993 + connect = 143 + EOS + + assert_match /successful/, pipe_output("#{bin}/stunnel #{testpath}/tstunnel.conf 2>&1") + end end |
