75 lines
2.4 KiB
Ruby
75 lines
2.4 KiB
Ruby
class Rsyslog < Formula
|
|
desc "Enhanced, multi-threaded syslogd"
|
|
homepage "https://www.rsyslog.com/"
|
|
url "https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.37.0.tar.gz"
|
|
sha256 "295c289b4c8abd8f8f3fe35a83249b739cedabe82721702b910255f9faf147e7"
|
|
|
|
bottle do
|
|
sha256 "86ca9ebf3b35b31e61464b02603532d29c2bbb4f74690c004cbe2e599d102d49" => :mojave
|
|
sha256 "a7830278d2bddc26ab55d32cf4b424f9ef46fe4e14d3a152594560b65e8cccc4" => :high_sierra
|
|
sha256 "162a2cff81e34d67cca2696f5b0b09a511b13c56236828eb2014f05f2e6416ff" => :sierra
|
|
sha256 "a46359fabb1218e33e0fbdddf71ebe7361504d1c40b5473a8484b2f5f4ed2784" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "libestr"
|
|
|
|
resource "libfastjson" do
|
|
url "http://download.rsyslog.com/libfastjson/libfastjson-0.99.8.tar.gz"
|
|
sha256 "3544c757668b4a257825b3cbc26f800f59ef3c1ff2a260f40f96b48ab1d59e07"
|
|
end
|
|
|
|
def install
|
|
resource("libfastjson").stage do
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{libexec}"
|
|
system "make", "install"
|
|
end
|
|
|
|
ENV.prepend_path "PKG_CONFIG_PATH", libexec/"lib/pkgconfig"
|
|
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--disable-dependency-tracking
|
|
--enable-imfile
|
|
--enable-usertools
|
|
--enable-diagtools
|
|
--disable-uuid
|
|
--disable-libgcrypt
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
plist_options :manual => "rsyslogd -f #{HOMEBREW_PREFIX}/etc/rsyslog.conf -i #{HOMEBREW_PREFIX}/var/run/rsyslogd.pid"
|
|
|
|
def plist; <<~EOS
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_sbin}/rsyslogd</string>
|
|
<string>-n</string>
|
|
<string>-f</string>
|
|
<string>#{etc}/rsyslog.conf</string>
|
|
<string>-i</string>
|
|
<string>#{var}/run/rsyslogd.pid</string>
|
|
</array>
|
|
<key>StandardErrorPath</key>
|
|
<string>#{var}/log/rsyslogd.log</string>
|
|
<key>StandardOutPath</key>
|
|
<string>#{var}/log/rsyslogd.log</string>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
end
|