b2sum 20160619 (new formula)
Installs the reference implementation of the b2sum command line tool from the official source repository. b2sum is a command line tool to hash files using the BLAKE2 hash function. Closes #2208. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This commit is contained in:
parent
a5988dbec9
commit
e016cda47d
1 changed files with 18 additions and 0 deletions
18
Formula/b2sum.rb
Normal file
18
Formula/b2sum.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue