From 5c8ae99283ac5e3eede915946ff8b2cd13a131cf Mon Sep 17 00:00:00 2001 From: Brian Conway Date: Wed, 15 Oct 2014 14:48:01 -0500 Subject: libhdhomerun 20141210 - Makefile patching no longer necessary with this version (ppc is out). - Headers for install are named as hdhomerun*.h explicitly. - test hdhomerun_config for either presence or lack of devices (differing return codes) Closes #33193. Signed-off-by: Mike McQuaid --- Library/Formula/libhdhomerun.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Library/Formula/libhdhomerun.rb (limited to 'Library/Formula') diff --git a/Library/Formula/libhdhomerun.rb b/Library/Formula/libhdhomerun.rb new file mode 100644 index 000000000..c86dad365 --- /dev/null +++ b/Library/Formula/libhdhomerun.rb @@ -0,0 +1,21 @@ +require "formula" + +class Libhdhomerun < Formula + homepage "https://www.silicondust.com/support/downloads/linux/" + url "http://download.silicondust.com/hdhomerun/libhdhomerun_20141210.tgz" + sha1 "4f6827e17f8f79401f272f62089352fe01eae740" + + def install + system "make" + bin.install "hdhomerun_config" + lib.install "libhdhomerun.dylib" + include.install Dir["hdhomerun*.h"] + end + + test do + # Devices may be found or not found, with differing return codes + discover = pipe_output("#{bin}/hdhomerun_config discover") + outputs = ["no devices found", "hdhomerun device", "found at"] + assert outputs.any? { |x| discover.include? x } + end +end -- cgit v1.2.3