45 lines
1.4 KiB
Ruby
45 lines
1.4 KiB
Ruby
class Pazpar2 < Formula
|
|
desc "Metasearching middleware webservice"
|
|
homepage "https://www.indexdata.com/pazpar2"
|
|
url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.12.13.tar.gz"
|
|
sha256 "02a97773ba27a2481744fc2323a9488a64661f7d1da09e5e61443c9b6a10cbed"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "875009e895fa9307a7303045fbd9dd544e7d531d0c4447ef29dd6c0cbf2dc2b4" => :high_sierra
|
|
sha256 "627a9d0910b8eed46e52a935e76a340dfc43e13337cb9d659482d31cf9d47237" => :sierra
|
|
sha256 "fb1d1b13500300e78ae7157566f2e0d4cbf0576d621ba03a3afba510b273cbff" => :el_capitan
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/indexdata/pazpar2.git"
|
|
depends_on "automake" => :build
|
|
depends_on "autoconf" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "icu4c" => :recommended
|
|
depends_on "yaz"
|
|
|
|
def install
|
|
system "./buildconf.sh" if build.head?
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test-config.xml").write <<~EOS
|
|
<?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"
|
|
end
|
|
end
|