aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libnfc.rb
blob: 6b83928762e4f20dfdeeda401dc7952c3b94baea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'formula'

class Libnfc < Formula
  homepage 'http://www.libnfc.org/'
  url 'http://libnfc.googlecode.com/files/libnfc-1.5.1.tar.gz'
  sha1 'aebd4a126f2268d06ade445cd6cf2b3c59256f51'

  depends_on 'libusb-compat'

  option 'with-pn532_uart', 'Enable PN532 UART support'

  def install
    args = %W[
      --disable-debug
      --disable-dependency-tracking
      --prefix=#{prefix}
    ]

    if build.include? 'with-pn532_uart'
      args << "--enable-serial-autoprobe"
      args << "--with-drivers=pn532_uart"
    end

    system "./configure", *args
    system "make install"
  end
end