51 lines
1.7 KiB
Ruby
51 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.15.0.tar.gz"
|
|
sha256 "b43a9e4dd2c231442ea07af7a05e929cd6cae2921826f66d201397b838aa8aac"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "381c1a291c26cb0c6f762a406073fd8cf928546b807a1b07008eff445596213c" => :mojave
|
|
sha256 "9d8bde99c0381cb3a72e26dd41a5d6595be4a951fe72719a88a2444839a2880e" => :high_sierra
|
|
sha256 "f3ae9ef9ab5c6d055638f1b92b93d05b732dac62f1ecd249296644895a469314" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "yazpp"
|
|
|
|
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
|
|
<?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
|