2011-05-28 00:52:46 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libnfc < Formula
|
2011-12-20 07:58:25 +00:00
|
|
|
url 'http://libnfc.googlecode.com/files/libnfc-1.5.1.tar.gz'
|
2011-05-28 00:52:46 +00:00
|
|
|
homepage 'http://www.libnfc.org/'
|
2011-12-20 07:58:25 +00:00
|
|
|
md5 '81e3e59496060dc495c95844654a8038'
|
2011-05-28 00:52:46 +00:00
|
|
|
|
|
|
|
depends_on 'libusb-compat'
|
|
|
|
|
2011-07-18 20:02:11 +00:00
|
|
|
def options
|
2011-12-20 07:58:25 +00:00
|
|
|
[['--with-pn532_uart', 'Enable PN532 UART support']]
|
2011-07-18 20:02:11 +00:00
|
|
|
end
|
|
|
|
|
2011-05-28 00:52:46 +00:00
|
|
|
def install
|
2011-12-20 07:58:25 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"]
|
2011-07-18 20:02:11 +00:00
|
|
|
|
|
|
|
if ARGV.include? '--with-pn532_uart'
|
|
|
|
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
|