diff --git a/Library/Formula/mpd.rb b/Library/Formula/mpd.rb index d1d06206c059..c3ad59a78f59 100644 --- a/Library/Formula/mpd.rb +++ b/Library/Formula/mpd.rb @@ -4,7 +4,7 @@ class Mpd < Formula stable do url "http://www.musicpd.org/download/mpd/0.19/mpd-0.19.9.tar.xz" - sha1 "6683bee5f132eda318c5a61ec14b2df8d9164d60" + sha256 "47851423053cd38cfad65be5985b41b7cd5bdbe8d0d13378e11748a28b19f26f" end bottle do @@ -70,6 +70,7 @@ def install --disable-debug --disable-dependency-tracking --prefix=#{prefix} + --sysconfdir=#{etc} --enable-bzip2 --enable-ffmpeg --enable-fluidsynth @@ -89,7 +90,9 @@ def install system "./configure", *args system "make" ENV.j1 # Directories are created in parallel, so let's not do that - system "make install" + system "make", "install" + + (etc+"mpd").install "doc/mpdconf.example" => "mpd.conf" end plist_options :manual => "mpd" @@ -116,4 +119,18 @@ def plist; <<-EOS.undent EOS end + + test do + pid = fork do + exec "#{bin}/mpd --stdout --no-daemon --no-config" + end + sleep 2 + + begin + assert_match /OK MPD/, shell_output("curl localhost:6600") + ensure + Process.kill("SIGINT", pid) + Process.wait(pid) + end + end end