jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / r / rpki-client.rb
blob3e7578f25def8614a0eae026b2d0b76733499d3a
1 class RpkiClient < Formula
2   desc "OpenBSD portable rpki-client"
3   homepage "https://www.rpki-client.org/"
4   url "https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-9.4.tar.gz"
5   sha256 "f3bd2cda5517826b717c574f122ee075eb35866b923b558de6a2720517f0bb6a"
6   license "ISC"
8   livecheck do
9     url "https://ftp.openbsd.org/pub/OpenBSD/rpki-client/"
10     regex(/href=.*?rpki-client[._-]v?(\d+(?:\.\d+)+)\.t/i)
11   end
13   bottle do
14     sha256 arm64_sequoia: "b159435cc16a2e5dc94aef656a44c3fae592ff761af859a9eaf89d97342c2692"
15     sha256 arm64_sonoma:  "d0ce6065e42669a5b317d783029bd4a6a694db9f4d86a49cc2fc5bdd6bc8ecce"
16     sha256 arm64_ventura: "ea84cf4764b4689397031f4ad212699642d5896baece5dc4f89a3006f1c40c03"
17     sha256 sonoma:        "97433f4e2de90132dd86bbe767ad45a93b34f037b77f2a767f9724f16e9c69b0"
18     sha256 ventura:       "a8071143e5de9b7ba1032794a3bfef5580a6c6a2cac24f77d1cd597dedb717bb"
19     sha256 x86_64_linux:  "e96386683cc04c1467d92b92d2f38bc6cf9d1deb1f42c208c557f9a89a57259b"
20   end
22   depends_on "pkgconf" => :build
23   depends_on "libretls"
24   depends_on "openssl@3"
25   depends_on "rsync"
27   uses_from_macos "expat"
28   uses_from_macos "zlib"
30   def install
31     system "./configure", "--with-rsync=#{Formula["rsync"].opt_bin}/rsync",
32                           "--disable-silent-rules",
33                           "--sysconfdir=#{etc}",
34                           "--localstatedir=#{var}",
35                           *std_configure_args
36     system "make", "install"
37   end
39   def post_install
40     # make the var/db,cache/rpki-client dirs
41     (var/"db/rpki-client").mkpath
42     (var/"cache/rpki-client").mkpath
43   end
45   test do
46     assert_match "VRP Entries: 0 (0 unique)", shell_output("#{sbin}/rpki-client -n -d . -R . 2>&1")
47     assert_match "rpki-client-portable #{version}", shell_output("#{sbin}/rpki-client -V 2>&1")
48   end
49 end