/
pazpar2.rb
37 lines (31 loc) 路 1009 Bytes
/
pazpar2.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "formula"
class Pazpar2 < Formula
homepage "http://www.indexdata.com/pazpar2"
url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.7.4.tar.gz"
sha1 "65950de34c3e0e11c928db37f0a18912b7670660"
bottle do
cellar :any
sha1 "236a66e68795e025eb4254c7fc9a4943a061dcdf" => :mavericks
sha1 "afc5a5c73e86a408eddaa53663f24280ff8ce7de" => :mountain_lion
sha1 "b1cde892f7a25f78bf2f25826c674b7007cefc2b" => :lion
end
depends_on "pkg-config" => :build
depends_on "yaz"
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
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"
end
end