class Pulledpork < Formula desc "Snort rule management" homepage "https://github.com/shirkdog/pulledpork" url "https://github.com/shirkdog/pulledpork/archive/v0.7.3.tar.gz" sha256 "48c66dc9abb7545186d4fba497263c1d1b247c0ea7f0953db4d515e7898461a2" head "https://github.com/shirkdog/pulledpork.git" bottle do cellar :any sha256 "5638c0dd4c2a28e24369ea1b02ffd09ae4a5f7e38231fc9f00cb250f47f519f4" => :mojave sha256 "4e8a01b1531f4b1824358e3a28c968ac04f7c5c78c5c4a878178ae825472b228" => :high_sierra sha256 "33cf47b4c02e4f2ba57f6b34770bafcda115d9b249b1227596e71c3f200c4083" => :sierra sha256 "e17149bd41a6f5f74d796c95c92710996e936dba1c2b1d523e89c3c29bdc2219" => :el_capitan end depends_on "openssl" resource "Switch" do url "https://cpan.metacpan.org/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz" sha256 "31354975140fe6235ac130a109496491ad33dd42f9c62189e23f49f75f936d75" end resource "Crypt::SSLeay" do url "https://cpan.metacpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz" sha256 "f5d34f813677829857cf8a0458623db45b4d9c2311daaebe446f9e01afa9ffe8" end def install ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" resources.each do |r| r.stage do system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" system "make" system "make", "install" end end chmod 0755, "pulledpork.pl" bin.install "pulledpork.pl" bin.env_script_all_files(libexec/"bin", :PERL5LIB => ENV["PERL5LIB"]) doc.install Dir["doc/*"] (etc/"pulledpork").install Dir["etc/*"] end test do assert_match version.to_s, shell_output("#{bin}/pulledpork.pl -V") end end