2014-03-15 14:25:05 +00:00
|
|
|
require "formula"
|
2014-03-14 13:36:07 +00:00
|
|
|
|
|
|
|
class Pazpar2 < Formula
|
2014-03-15 14:25:05 +00:00
|
|
|
homepage "http://www.indexdata.com/pazpar2"
|
2014-04-23 12:43:19 +00:00
|
|
|
url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.6.41.tar.gz"
|
|
|
|
sha1 "89c97f35b7aac0e88798458192132e1cd8f2af6f"
|
2014-03-14 13:36:07 +00:00
|
|
|
|
2014-03-24 09:58:07 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-04-26 13:35:32 +00:00
|
|
|
sha1 "491cc42e1f70344396f73270bba9101c487cdfc1" => :mavericks
|
|
|
|
sha1 "45501784c3d44ebdc833047573d8e78c2e495a39" => :mountain_lion
|
|
|
|
sha1 "29aa33b793d41ac2285220a85d252958939a109e" => :lion
|
2014-03-24 09:58:07 +00:00
|
|
|
end
|
|
|
|
|
2014-03-15 14:25:05 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "yaz"
|
2014-03-14 13:36:07 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2014-03-15 14:25:05 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test-config.xml").write <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
|
|
|
|
<threads number="2"/>
|
|
|
|
<server>
|
|
|
|
<listen port="8004"/>
|
|
|
|
</server>
|
|
|
|
</pazpar2>
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system "#{sbin}/pazpar2", "-t", "-f", "#{testpath}/test-config.xml"
|
2014-03-14 13:36:07 +00:00
|
|
|
end
|
|
|
|
end
|