homebrew-core/Formula/librtlsdr.rb
2014-10-20 15:02:15 +01:00

36 lines
938 B
Ruby

require "formula"
class Librtlsdr < Formula
homepage "http://sdr.osmocom.org/trac/wiki/rtl-sdr"
head "git://git.osmocom.org/rtl-sdr.git", :shallow => false
url "https://github.com/steve-m/librtlsdr/archive/v0.5.3.tar.gz"
sha1 "f6f20f7b0562a6d3f7b9ff7bff38a15bff175982"
bottle do
cellar :any
revision 1
sha1 "8680ce437b474e7032b29cb74707a83dccd31a94" => :yosemite
sha1 "c1e932c691bf46a96c254907201dbf00165f33e5" => :mavericks
sha1 "e9acc1e44e8cf4c6814b1dee47ea226a24a06d9e" => :mountain_lion
end
option :universal
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "libusb"
def install
args = std_cmake_args
if build.universal?
ENV.universal_binary
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end
mkdir "build" do
system "cmake", "..", *args
system "make install"
end
end
end