b0ee179659
Closes Homebrew/homebrew#30375.
51 lines
1.5 KiB
Ruby
51 lines
1.5 KiB
Ruby
require "formula"
|
|
|
|
class Metaproxy < Formula
|
|
homepage "http://www.indexdata.com/metaproxy"
|
|
url "http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.5.5.tar.gz"
|
|
sha1 "442373585091a2767e0c7082453855180eb47a2e"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha1 "393035349c51e94da7a01029525586feb0cd10d9" => :mavericks
|
|
sha1 "69bce941d44902235b43aaa927d7ec83be968234" => :mountain_lion
|
|
sha1 "5fc1faf5c51dbd4131de7d399848acaa1dd6b919" => :lion
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "yazpp"
|
|
depends_on "boost"
|
|
|
|
def install
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
# Test by making metaproxy test a trivial configuration file (etc/config0.xml).
|
|
test do
|
|
(testpath/"test-config.xml").write <<-EOS.undent
|
|
<?xml version="1.0"?>
|
|
<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
|
|
<start route="start"/>
|
|
<filters>
|
|
<filter id="frontend" type="frontend_net">
|
|
<port max_recv_bytes="1000000">@:9070</port>
|
|
<message>FN</message>
|
|
<stat-req>/fn_stat</stat-req>
|
|
</filter>
|
|
</filters>
|
|
<routes>
|
|
<route id="start">
|
|
<filter refid="frontend"/>
|
|
<filter type="log"><category access="false" line="true" apdu="true" /></filter>
|
|
<filter type="backend_test"/>
|
|
<filter type="bounce"/>
|
|
</route>
|
|
</routes>
|
|
</metaproxy>
|
|
EOS
|
|
|
|
system "#{bin}/metaproxy", "-t", "--config", "#{testpath}/test-config.xml"
|
|
end
|
|
end
|