require 'formula' class Ykpers < Formula homepage 'http://yubico.github.io/yubikey-personalization/' url 'http://opensource.yubico.com/yubikey-personalization/releases/ykpers-1.15.1.tar.gz' sha1 'dd1478cc106c624318dfe74bb2beda54f18f1fc8' option :universal depends_on 'libyubikey' depends_on 'json-c' => :recommended depends_on 'pkg-config' => :build def install ENV.universal_binary if build.universal? libyubikey_prefix = Formula["libyubikey"].opt_prefix system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-libyubikey-prefix=#{libyubikey_prefix}", "--with-backend=osx" system "make check" system "make install" end end