2011-09-02 06:05:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cfengine < Formula
|
|
|
|
homepage 'http://cfengine.com/'
|
2012-08-06 22:10:01 +00:00
|
|
|
url 'https://cfengine.com/source-code/download?file=cfengine-3.3.5.tar.gz'
|
|
|
|
sha1 '205896ba59a472de363c06e6847cecaf4cfbc5cf'
|
2011-09-02 06:05:41 +00:00
|
|
|
|
|
|
|
depends_on 'tokyo-cabinet'
|
2012-05-10 18:56:19 +00:00
|
|
|
depends_on 'pcre'
|
2011-09-02 06:05:41 +00:00
|
|
|
|
2012-05-15 03:06:58 +00:00
|
|
|
def patches
|
|
|
|
# See https://github.com/cfengine/core/commit/ce2b8abf
|
|
|
|
"https://github.com/cfengine/core/commit/ce2b8abf.patch" if ENV.compiler == :clang
|
|
|
|
end
|
|
|
|
|
2011-09-02 06:05:41 +00:00
|
|
|
def install
|
2012-05-10 18:56:19 +00:00
|
|
|
# Find our libpcre
|
|
|
|
ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
|
|
|
|
|
2012-04-13 15:43:36 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-workdir=#{var}/cfengine",
|
|
|
|
"--with-tokyocabinet"
|
2012-04-18 04:51:58 +00:00
|
|
|
system "make install"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/cf-agent", "-V"
|
2011-09-02 06:05:41 +00:00
|
|
|
end
|
|
|
|
end
|