diff options
| author | Sven-S. Porst | 2014-03-15 15:25:05 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-24 10:01:44 +0000 |
| commit | d11c503ad6d3218f55464e251efad645bfe622f7 (patch) | |
| tree | 35fd085ae83b1e0dccc21348607e68e8458a69c7 /Library/Formula | |
| parent | 12c0ccf84480185b75a710d9f9b078f09fe078e7 (diff) | |
| download | homebrew-d11c503ad6d3218f55464e251efad645bfe622f7.tar.bz2 | |
pazpar2: test and use make install.
Address @mikemcquaid’s remarks on pull requests #27547 and #27784:
* add a test: (ask pazpar2 to test a trivial server
configuration file; to be honest I doubt this test
is much more significant than testing the version)
* use double quotes instead of quotes for strings
(it would be helpful if the examples/documentation
just stated this »rule«)
* use make install instead of bin.install (the binary
ends up in sbin this way)
* split command arguments
* linebreak
* replace »TEST_CONFIG« with »EOS«
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/pazpar2.rb | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Library/Formula/pazpar2.rb b/Library/Formula/pazpar2.rb index f2169120c..b15ab2888 100644 --- a/Library/Formula/pazpar2.rb +++ b/Library/Formula/pazpar2.rb @@ -1,17 +1,30 @@ -require 'formula' +require "formula" class Pazpar2 < Formula - homepage 'http://www.indexdata.com/pazpar2' - url 'http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.6.39.tar.gz' - sha1 '2be29efecc4f0ed5a6a300638b7ef6577d1e34e4' + homepage "http://www.indexdata.com/pazpar2" + url "http://ftp.indexdata.dk/pub/pazpar2/pazpar2-1.6.39.tar.gz" + sha1 "2be29efecc4f0ed5a6a300638b7ef6577d1e34e4" - depends_on 'pkg-config' => :build - depends_on 'yaz' + depends_on "pkg-config" => :build + depends_on "yaz" def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system 'make' - bin.install 'src/pazpar2' + 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 |
