2011-01-05 14:09:07 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ykpers < Formula
|
2013-04-22 20:54:41 +00:00
|
|
|
homepage 'http://yubico.github.io/yubikey-personalization/'
|
|
|
|
url 'http://yubico.github.io/yubikey-personalization/releases/ykpers-1.13.0.tar.gz'
|
|
|
|
sha1 'dcf3b1d8749c3bfda9bc84e469d4676fdb22ae23'
|
2011-01-05 14:09:07 +00:00
|
|
|
|
|
|
|
depends_on 'libyubikey'
|
2013-06-25 14:27:27 +00:00
|
|
|
depends_on 'json-c' => :recommended
|
|
|
|
depends_on 'pkg-config' => :build
|
2011-01-05 14:09:07 +00:00
|
|
|
|
2012-07-29 20:58:47 +00:00
|
|
|
# Pre-Lion fix, per MacPorts. See:
|
|
|
|
# https://trac.macports.org/ticket/34910
|
|
|
|
def patches
|
|
|
|
{:p0 =>
|
|
|
|
"https://trac.macports.org/export/96037/trunk/dports/security/ykpers/files/patch-pre-Lion-strnlen.diff"
|
2012-09-05 04:04:01 +00:00
|
|
|
} unless MacOS.version >= :lion
|
2012-07-29 20:58:47 +00:00
|
|
|
end
|
|
|
|
|
2011-01-05 14:09:07 +00:00
|
|
|
def install
|
2013-06-30 17:53:11 +00:00
|
|
|
libyubikey_prefix = Formula.factory('libyubikey').opt_prefix
|
2013-06-30 17:53:46 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2012-06-15 05:15:01 +00:00
|
|
|
"--with-libyubikey-prefix=#{libyubikey_prefix}",
|
2013-06-30 17:53:46 +00:00
|
|
|
"--with-backend=osx"
|
2013-06-25 14:27:27 +00:00
|
|
|
system "make check"
|
2011-01-05 14:09:07 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|