2011-05-28 00:52:46 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libnfc < Formula
|
|
|
|
homepage 'http://www.libnfc.org/'
|
2012-09-05 05:50:55 +00:00
|
|
|
url 'http://libnfc.googlecode.com/files/libnfc-1.6.0-rc1.tar.gz'
|
|
|
|
sha1 'bbff76269120c3a531eb96b7ceb96fd36c0071a1'
|
2011-05-28 00:52:46 +00:00
|
|
|
|
|
|
|
depends_on 'libusb-compat'
|
|
|
|
|
2012-09-02 18:42:54 +00:00
|
|
|
option 'with-pn532_uart', 'Enable PN532 UART support'
|
2011-07-18 20:02:11 +00:00
|
|
|
|
2011-05-28 00:52:46 +00:00
|
|
|
def install
|
2012-09-02 18:42:54 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2011-07-18 20:02:11 +00:00
|
|
|
|
2012-09-02 18:42:54 +00:00
|
|
|
if build.include? 'with-pn532_uart'
|
2011-07-18 20:02:11 +00:00
|
|
|
args << "--enable-serial-autoprobe"
|
|
|
|
args << "--with-drivers=pn532_uart"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2011-05-28 00:52:46 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|