2011-09-02 06:05:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cfengine < Formula
|
|
|
|
homepage 'http://cfengine.com/'
|
2014-12-07 23:06:50 +00:00
|
|
|
url 'http://s3.amazonaws.com/cfengine.package-repos/tarballs/cfengine-3.6.3.tar.gz'
|
|
|
|
sha1 '90b5577bbeb6215e0ffbc19bf0fe6c2e01bda596'
|
2011-09-02 06:05:41 +00:00
|
|
|
|
2014-12-07 23:06:50 +00:00
|
|
|
resource "masterfiles" do
|
|
|
|
url "http://s3.amazonaws.com/cfengine.package-repos/tarballs/masterfiles-3.6.3.tar.gz"
|
|
|
|
sha1 "23496c323ee9d8204d78a2047ef7a90c61d12b18"
|
2014-11-27 00:22:33 +00:00
|
|
|
end
|
|
|
|
|
2012-05-10 18:56:19 +00:00
|
|
|
depends_on 'pcre'
|
2014-08-06 15:46:13 +00:00
|
|
|
depends_on 'lmdb'
|
|
|
|
depends_on 'autoconf' => :build
|
|
|
|
depends_on 'automake' => :build
|
|
|
|
depends_on 'libtool' => :build
|
2013-09-17 17:14:22 +00:00
|
|
|
depends_on 'libxml2' if MacOS.version < :mountain_lion
|
2014-11-27 00:14:17 +00:00
|
|
|
depends_on "openssl"
|
2013-09-17 17:14:22 +00:00
|
|
|
|
2011-09-02 06:05:41 +00:00
|
|
|
def install
|
2014-08-06 15:46:13 +00:00
|
|
|
system "autoreconf", "-Wno-portability", "-fvi", "-I", "m4" # see autogen.sh
|
2012-04-13 15:43:36 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-workdir=#{var}/cfengine",
|
2014-08-06 15:46:13 +00:00
|
|
|
"--with-lmdb=#{Formula['lmdb'].opt_prefix}",
|
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"
|
2014-12-07 23:06:50 +00:00
|
|
|
(share/"cfengine/CoreBase").install resource("masterfiles")
|
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
|