2014-11-05 20:54:53 +00:00
|
|
|
class Blucat < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "netcat for Bluetooth"
|
2014-11-05 20:54:53 +00:00
|
|
|
homepage "http://blucat.sourceforge.net/blucat/"
|
2016-05-01 15:29:23 +00:00
|
|
|
url "https://github.com/ieee8023/blucat/archive/v0.91.tar.gz"
|
|
|
|
sha256 "3e006d25b7e82689826c89ffbbfa818f8b78cced47e6d0647e901578d330a2f4"
|
|
|
|
head "https://github.com/ieee8023/blucat.git"
|
2014-11-17 00:08:16 +00:00
|
|
|
|
2016-05-01 20:32:00 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "83405eb090f0790e63a1edba4e369d6c87ada03219b1412e1d417a7b8fc66ba3" => :el_capitan
|
|
|
|
sha256 "5453287bd14c8cc5dc5f575ea01a618ddb213035cbe25536ac1b52d212d34d1b" => :yosemite
|
|
|
|
sha256 "17c6e60c3900d8c7065108d87d43dfdee76906c18bc8c872577f4d75cb984596" => :mavericks
|
|
|
|
end
|
|
|
|
|
2014-11-05 20:54:53 +00:00
|
|
|
depends_on "ant" => :build
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.6+"
|
2014-11-05 20:54:53 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "ant"
|
|
|
|
libexec.install "blucat"
|
|
|
|
libexec.install "lib"
|
|
|
|
libexec.install "build"
|
|
|
|
bin.write_exec_script libexec/"blucat"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-05-01 15:29:23 +00:00
|
|
|
begin
|
|
|
|
io = IO.popen("#{bin}/blucat scan 0")
|
|
|
|
sleep 1
|
|
|
|
assert_equal "#Scanning RFCOMM Channels 1-30", io.gets.strip
|
|
|
|
ensure
|
|
|
|
Process.kill "TERM", io.pid
|
|
|
|
Process.wait io.pid
|
|
|
|
end
|
2014-11-05 20:54:53 +00:00
|
|
|
end
|
|
|
|
end
|