42 lines
1.4 KiB
Ruby
42 lines
1.4 KiB
Ruby
class Ntp < Formula
|
|
desc "Network Time Protocol (NTP) Distribution"
|
|
homepage "https://www.eecis.udel.edu/~mills/ntp/html/"
|
|
url "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz"
|
|
version "4.2.8p15"
|
|
sha256 "f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19"
|
|
|
|
livecheck do
|
|
url "https://www.ntp.org/downloads.html"
|
|
regex(/href=.*?ntp[._-]v?(\d+(?:\.\d+)+(?:p\d+)?)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "cee6250b029cdb17a3e7c8f68ec6bf16a3a3751bea52a758bca885932e5a0de4" => :big_sur
|
|
sha256 "3c6a8893b0e76b8af1a4fd19ab664279b5409c1129062bf1feee4643318236b3" => :catalina
|
|
sha256 "b69ded37b2c8304157c3f46e4484af9099b4fd1e077929c35bb630903d059856" => :mojave
|
|
sha256 "9f7ce9c3ff545ff738fcf4049445923c968ec807cf1ecde451be76412442e6f1" => :high_sierra
|
|
end
|
|
|
|
depends_on "openssl@1.1"
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--disable-silent-rules
|
|
--prefix=#{prefix}
|
|
--with-openssl-libdir=#{Formula["openssl@1.1"].lib}
|
|
--with-openssl-incdir=#{Formula["openssl@1.1"].include}
|
|
--with-net-snmp-config=no
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install", "LDADD_LIBNTP=-lresolv -undefined dynamic_lookup"
|
|
end
|
|
|
|
test do
|
|
assert_match "step time server ", shell_output("#{sbin}/ntpdate -bq pool.ntp.org")
|
|
end
|
|
end
|