homebrew-core/Formula/metaproxy.rb
2017-08-27 03:00:38 -07:00

50 lines
1.7 KiB
Ruby

class Metaproxy < Formula
desc "Z39.50 proxy and router utilizing Yaz toolkit"
homepage "https://www.indexdata.com/metaproxy"
url "http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.12.1.tar.gz"
sha256 "65b2138381a6a2d5a10f789b45f3472ceed2bf2cdfa35e88adfb262fd058fb48"
bottle do
cellar :any
sha256 "17d0bb31f7afd8a576a044e836dbd3b7699873b90a7e874aebaad27853cb506c" => :sierra
sha256 "a606731cd201f674c67b304f919c9e893e8333624946e34ddc87f217e206187a" => :el_capitan
sha256 "867b7fe3a7bb192fbacbb71ff2f627b9edb5eaad155da748dc7e4b25fd35ccd9" => :yosemite
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