2011-09-02 06:05:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2013-06-15 18:37:51 +00:00
|
|
|
# https version doesn't download with system curl on Snow Leopard
|
2013-12-14 18:13:11 +00:00
|
|
|
# https://github.com/Homebrew/homebrew/issues/20339
|
2011-09-02 06:05:41 +00:00
|
|
|
class Cfengine < Formula
|
|
|
|
homepage 'http://cfengine.com/'
|
2014-01-27 22:35:42 +00:00
|
|
|
url 'http://cfengine.com/source-code/download?file=cfengine-3.5.3.tar.gz'
|
|
|
|
sha1 '95a03e7bc9e31704d6aac4b3023b9c5037fc33f6'
|
2011-09-02 06:05:41 +00:00
|
|
|
|
2012-05-10 18:56:19 +00:00
|
|
|
depends_on 'pcre'
|
2013-06-08 00:18:50 +00:00
|
|
|
depends_on 'tokyo-cabinet'
|
2013-09-17 17:14:22 +00:00
|
|
|
depends_on 'libxml2' if MacOS.version < :mountain_lion
|
|
|
|
|
2014-03-17 00:35:06 +00:00
|
|
|
# Upstream patches for OS X compilation
|
|
|
|
patch do
|
2014-04-11 23:07:51 +00:00
|
|
|
url "https://github.com/cfengine/core/commit/d03fcc2d38a4db0c79386aaef30597102bf45853.diff"
|
|
|
|
sha1 "1050a7f1719b8ad0e04868319324cc38637a3725"
|
2013-09-17 17:14:22 +00:00
|
|
|
end
|
2011-09-02 06:05:41 +00:00
|
|
|
|
|
|
|
def install
|
2012-04-13 15:43:36 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-workdir=#{var}/cfengine",
|
2013-11-19 01:47:12 +00:00
|
|
|
"--with-tokyocabinet",
|
2014-02-25 04:42:31 +00:00
|
|
|
"--with-pcre=#{Formula['pcre'].opt_prefix}",
|
2013-11-19 01:47:12 +00:00
|
|
|
"--without-mysql",
|
|
|
|
"--without-postgresql"
|
2012-04-18 04:51:58 +00:00
|
|
|
system "make install"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/cf-agent", "-V"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
end
|