homebrew-core/Formula/logcheck.rb

29 lines
1005 B
Ruby

class Logcheck < Formula
desc "Mail anomalies in the system logfiles to the administrator"
homepage "https://packages.debian.org/sid/logcheck"
url "https://deb.debian.org/debian/pool/main/l/logcheck/logcheck_1.3.24.tar.xz"
sha256 "5e304adf2880967c3b155bcf98e4f0809417a16bf91adb372fa065f38ab2c0cf"
license "GPL-2.0-only"
livecheck do
url "https://packages.debian.org/unstable/logcheck"
regex(/href=.*?logcheck[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "61e22e669355cf8f2e76bedc10668a0a4c6b96844727271de2855d27699fac2a"
end
def install
inreplace "Makefile", "$(DESTDIR)/$(CONFDIR)", "$(CONFDIR)"
system "make", "install", "--always-make", "DESTDIR=#{prefix}",
"SBINDIR=sbin", "BINDIR=bin", "CONFDIR=#{etc}/logcheck"
end
test do
(testpath/"README").write "Boaty McBoatface"
output = shell_output("#{sbin}/logtail -f #{testpath}/README")
assert_match "Boaty McBoatface", output
end
end