From d11c503ad6d3218f55464e251efad645bfe622f7 Mon Sep 17 00:00:00 2001 From: Sven-S. Porst Date: Sat, 15 Mar 2014 15:25:05 +0100 Subject: 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« --- Library/Formula/pazpar2.rb | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'Library') 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 + + + + + + + + EOS + + system "#{sbin}/pazpar2", "-t", "-f", "#{testpath}/test-config.xml" end end -- cgit v1.2.3