Skip to content

Commit f00932b

Browse files
authored
Merge pull request #227721 from alex-sc/rnpgp
rnp 0.18.0 (new formula)
2 parents 82dfe37 + 490cc35 commit f00932b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

Formula/r/rnp.rb

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
class Rnp < Formula
2+
desc "High performance C++ OpenPGP library used by Mozilla Thunderbird"
3+
homepage "https://github.com/rnpgp/rnp"
4+
url "https://github.com/rnpgp/rnp/releases/download/v0.18.0/rnp-v0.18.0.tar.gz"
5+
sha256 "a90e3ac5b185a149665147f9284c0201a78431e81924883899244522fd3f9240"
6+
license all_of: ["MIT", "BSD-2-Clause", "BSD-3-Clause"]
7+
head "https://github.com/rnpgp/rnp.git", branch: "main"
8+
9+
livecheck do
10+
url :stable
11+
regex(/^v?(\d+(?:\.\d+)+)$/i)
12+
end
13+
14+
bottle do
15+
sha256 cellar: :any, arm64_sequoia: "3f32421017f5d7b8cbe686b773d77f7c489fc745aa187feb587b603a65a971eb"
16+
sha256 cellar: :any, arm64_sonoma: "63ad3905d1286594f3f98de8343474a660929974cd25caa0ebe4e9af505b5e41"
17+
sha256 cellar: :any, arm64_ventura: "1793864c5ac801908df2c185aaa75fdf1ec78b589f4d686a50fbc94f6ac2e357"
18+
sha256 cellar: :any, sonoma: "6bbb2952df99c6b04c3cbc4c4465e6ce0eeebdebde37fe971d55f2f782b7b58b"
19+
sha256 cellar: :any, ventura: "b1045aedf6befd06a9fc6c2399282298b74d034eb4d01b09eef31bcb94be6dda"
20+
sha256 cellar: :any_skip_relocation, x86_64_linux: "426c2a6c95992b27f8b08631049fac856888caf66ef7bfd6d5c2afd50c9f98a8"
21+
end
22+
depends_on "cmake" => :build
23+
depends_on "botan"
24+
depends_on "json-c"
25+
uses_from_macos "bzip2"
26+
uses_from_macos "zlib"
27+
28+
def install
29+
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
30+
system "cmake", "--build", "build"
31+
system "cmake", "--install", "build"
32+
end
33+
34+
test do
35+
(testpath/"message.txt").write "hello"
36+
encr = testpath/"enc.rnp"
37+
decr = testpath/"dec.rnp"
38+
39+
system bin/"rnpkeys", "--generate-key", "--password=PASSWORD"
40+
system bin/"rnp", "-c", "--password", "DUMMY", "--output", encr, "message.txt"
41+
system bin/"rnp", "--decrypt", "--password", "DUMMY", "--output", decr, encr
42+
43+
assert_equal "hello", decr.read
44+
end
45+
end

0 commit comments

Comments
 (0)