26 lines
734 B
Ruby
26 lines
734 B
Ruby
|
require "formula"
|
||
|
|
||
|
class SwitchaudioOsx < Formula
|
||
|
homepage "https://github.com/deweller/switchaudio-osx/"
|
||
|
url "https://github.com/deweller/switchaudio-osx/archive/1.0.0.tar.gz"
|
||
|
sha1 "4b7bae425f4b9ec71b67dc2c4c6f26fd195d623a"
|
||
|
head "https://github.com/deweller/switchaudio-osx.git"
|
||
|
|
||
|
depends_on :macos => :lion
|
||
|
depends_on :xcode => :build
|
||
|
|
||
|
def install
|
||
|
xcodebuild "-project", "AudioSwitcher.xcodeproj",
|
||
|
"-target", "SwitchAudioSource",
|
||
|
"SYMROOT=build",
|
||
|
"-verbose"
|
||
|
prefix.install Dir["build/Release/*"]
|
||
|
bin.write_exec_script "#{prefix}/SwitchAudioSource"
|
||
|
chmod 0755, "#{bin}/SwitchAudioSource"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
system "#{bin}/SwitchAudioSource", "-c"
|
||
|
end
|
||
|
end
|