class ShairportSync < Formula desc "AirTunes emulator. Shairport Sync adds multi-room capability." homepage "https://github.com/mikebrady/shairport-sync" url "https://github.com/mikebrady/shairport-sync/archive/3.0.1.tar.gz" sha256 "3fbde4f6e7f5cbc7200f782bd9faca25f7e91edf7dd7a3b514cd616e556a1fee" head "https://github.com/mikebrady/shairport-sync.git", :branch => "development" bottle do sha256 "567315721a575d144a93fe2d349844de795a58a50cd9ede488403a7c0c16139d" => :sierra sha256 "8c119b1aa997e81af8c01e5d9700e43ff82296ffa822447209ea9fe3f3ed2c0f" => :el_capitan sha256 "f599928fd8ab6977c5bca8b8325ccdc07e8f77d1829965a448cf116071f97bc4" => :yosemite end depends_on "pkg-config" => :build depends_on "autoconf" => :build depends_on "automake" => :build depends_on "openssl" depends_on "popt" depends_on "libsoxr" depends_on "libao" depends_on "libdaemon" depends_on "libconfig" def install system "autoreconf", "-fvi" args = %W[ --with-os-type=darwin --with-ssl=openssl --with-dns_sd --with-ao --with-stdout --with-pipe --with-soxr --with-metadata --with-piddir=#{var}/run --sysconfdir=#{etc}/shairport-sync --prefix=#{prefix} ] system "./configure", *args system "make", "install" end def post_install (var/"run").mkpath end test do output = shell_output("#{bin}/shairport-sync -V", 1) assert_match "OpenSSL-ao-stdout-pipe-soxr-metadata", output end end