class Activemq < Formula desc "Apache ActiveMQ: powerful open source messaging server" homepage "https://activemq.apache.org/" url "https://www.apache.org/dyn/closer.cgi?path=/activemq/5.15.4/apache-activemq-5.15.4-bin.tar.gz" sha256 "8993d9fd42a429d63b0cdc6e7ae23bee6af206ab1d97c7eaff1897f4bab5bca6" bottle :unneeded depends_on :java => "1.7+" def install rm_rf Dir["bin/linux-x86-*"] libexec.install Dir["*"] (bin/"activemq").write_env_script libexec/"bin/activemq", Language::Java.java_home_env("1.6+") end plist_options :manual => "activemq start" def plist; <<~EOS Label #{plist_name} RunAtLoad AbandonProcessGroup WorkingDirectory #{opt_libexec} ProgramArguments #{opt_bin}/activemq start EOS end test do system "#{bin}/activemq", "browse", "-h" end end