aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJonathan Wilkins2014-05-05 22:26:20 -0700
committerJack Nagel2014-05-10 11:22:54 -0500
commitb508739ee1c9183318a01c617bc087558e2df01f (patch)
tree7f12b1b418788c1f8bb0fec15574f763d49cb5f5 /Library/Formula
parentb3c9c9a28abe3482e4850526ca9cfcea62f72c10 (diff)
downloadhomebrew-b508739ee1c9183318a01c617bc087558e2df01f.tar.bz2
New formula: reop
reop is a gpg replacement based on djb's NaCl (via libsodium) Closes #28995. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/reop.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/Library/Formula/reop.rb b/Library/Formula/reop.rb
new file mode 100644
index 000000000..7f0af4275
--- /dev/null
+++ b/Library/Formula/reop.rb
@@ -0,0 +1,39 @@
+require "formula"
+
+class Reop < Formula
+ homepage "http://www.tedunangst.com/flak/post/reop"
+ head "https://github.com/tedu/reop.git"
+ url "https://github.com/tedu/reop/archive/1.0.0.tar.gz"
+ sha256 "8c2bf9a0b66e9a43cbcf3291858a97ccdc62736a378cd98aa3d3fc47f5db3798"
+
+ depends_on "libsodium"
+
+ def install
+ system "make", "-f", "Makefile.osx"
+ bin.install "reop"
+ end
+
+ test do
+ (testpath/"pubkey").write <<-EOS.undent
+ -----BEGIN REOP PUBLIC KEY-----
+ ident:root
+ RWRDUxZNDeX4wcynGeCr9Bro6Ic7s1iqi1XHYacEaHoy+7jOP+ZE0yxR+2sfaph2MW15e8eUZvvI
+ +lxZaqFZR6Kc4uVJnvirIK97IQ==
+ -----END REOP PUBLIC KEY-----
+ EOS
+
+ (testpath/"msg").write <<-EOS.undent
+ testing one two three four
+ EOS
+
+ (testpath/"sig").write <<-EOS.undent
+ -----BEGIN REOP SIGNATURE-----
+ ident:root
+ RWQWTQ3l+MHMpx8RO/+BX/xxHn0PiSneiJ1Au2GurAmx4L942nZFBRDOVw2xLzvp/RggTVTZ46k+
+ GLVjoS6fSuLneCfaoRlYHgk=
+ -----END REOP SIGNATURE-----
+ EOS
+
+ system "#{bin}/reop", "-V", "-x", "sig", "-p", "pubkey", "-m", "msg"
+ end
+end