diff --git a/Formula/b2sum.rb b/Formula/b2sum.rb new file mode 100644 index 0000000000..4510a754ee --- /dev/null +++ b/Formula/b2sum.rb @@ -0,0 +1,18 @@ +class B2sum < Formula + desc "BLAKE2 b2sum reference binary" + homepage "https://github.com/BLAKE2/BLAKE2" + url "https://github.com/BLAKE2/BLAKE2/archive/20160619.tar.gz" + sha256 "cbac833ccae56b5c6173dbeaf871aa99b32745cf7a994c7451d4533ecda55633" + + def install + cd "b2sum" do + system "make", "NO_OPENMP=1" + system "make", "install", "PREFIX=#{prefix}", "MANDIR=#{man}" + end + end + + test do + assert_equal "ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923 -", + pipe_output("#{bin}/b2sum -", "abc").chomp + end +end