homebrew-core/Formula/logcheck.rb

29 lines
1004 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.4.0.tar.xz"
sha256 "dfd95c980727108cc9b8921736af9388dea0f6157688c03e8e39de378107b3dc"
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: "ce01d92a5ca847e047f0123f6e27d0708bc0f0d768e30021a8660ca796b32aa9"
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