diff options
| author | David Christenson | 2014-07-11 13:09:38 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-07-13 20:01:58 -0500 |
| commit | 7ae69dc705c8820a53622323f222651444d2beb1 (patch) | |
| tree | eef23f24a98f2d838da21ef161b8043792cb3bec /Library/Formula | |
| parent | 2df3de9fcc616dec11fff090679e7ca3924261cf (diff) | |
| download | homebrew-7ae69dc705c8820a53622323f222651444d2beb1.tar.bz2 | |
LibreSSL 2.0.1
Closes #30817.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libressl.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Library/Formula/libressl.rb b/Library/Formula/libressl.rb new file mode 100644 index 000000000..d2ebac9cf --- /dev/null +++ b/Library/Formula/libressl.rb @@ -0,0 +1,44 @@ +require "formula" + +class Libressl < Formula + homepage "http://www.libressl.org/" + url "http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.0.1.tar.gz" + mirror "http://mirrors.nycbug.org/pub/OpenBSD/LibreSSL/libressl-2.0.1.tar.gz" + sha256 "9596f6cb3e8bafe35d749dfbdb6c984f1bbd86233598eb5fdb4abf854a5792ba" + + head do + url "https://github.com/libressl-portable/portable.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end + + keg_only "LibreSSL is not linked to prevent conflicts with the system OpenSSL." + + def install + system "./autogen.sh" if build.head? + + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-openssldir=#{etc}/libressl", + "--with-enginesdir=#{lib}/engines" + + system "make" + system "make", "check" + system "make", "install" + + mkdir_p "#{etc}/libressl" + touch "#{etc}/libressl/openssl.cnf" + end + + test do + (testpath/"testfile.txt").write("This is a test file") + expected_checksum = "91b7b0b1e27bfbf7bc646946f35fa972c47c2d32" + system "#{bin}/openssl", "dgst", "-sha1", "-out", "checksum.txt", "testfile.txt" + open("checksum.txt") do |f| + checksum = f.read(100).split("=").last.strip + assert_equal checksum, expected_checksum + end + end +end |
