2011-05-15 10:04:07 +00:00
|
|
|
class FreeradiusServer < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "High-performance and highly configurable RADIUS server"
|
2014-05-29 04:07:45 +00:00
|
|
|
homepage "http://freeradius.org/"
|
2015-02-17 13:50:16 +00:00
|
|
|
|
|
|
|
stable do
|
2015-05-08 13:10:27 +00:00
|
|
|
url "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.2.7.tar.bz2"
|
|
|
|
mirror "http://ftp.cc.uoc.gr/mirrors/ftp.freeradius.org/freeradius-server-2.2.7.tar.bz2"
|
|
|
|
sha256 "6b0af62ded0fda9bb24aee568c3bc9e5f0c0b736530df3c1260e2b6085f2e5f9"
|
2015-02-17 13:50:16 +00:00
|
|
|
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2011-05-15 10:04:07 +00:00
|
|
|
|
2014-09-27 15:14:28 +00:00
|
|
|
devel do
|
2015-05-08 13:10:27 +00:00
|
|
|
url "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.8.tar.bz2"
|
|
|
|
mirror "http://ftp.cc.uoc.gr/mirrors/ftp.freeradius.org/freeradius-server-3.0.8.tar.bz2"
|
|
|
|
sha256 "b89721c609e5a106936112fe8122e470f02a5197bb614e202d2c386f4821d902"
|
2014-09-27 15:14:28 +00:00
|
|
|
depends_on "talloc" => :build
|
|
|
|
end
|
|
|
|
|
2014-08-22 18:04:04 +00:00
|
|
|
bottle do
|
2015-05-08 13:40:51 +00:00
|
|
|
sha256 "8843ce6b2cacf638f211ff039a32c7f2a30e605fddf593d79760ceff52bd6a27" => :yosemite
|
|
|
|
sha256 "8485f3a73083a46f0b0c44b2351727db28c2ba3da6dce72c0f7737615d1b9f45" => :mavericks
|
|
|
|
sha256 "bfb6f2e71540d9a7763d242463bad1197e531825f84f7b1c1b09ad7ab7cde089" => :mountain_lion
|
2014-08-22 18:04:04 +00:00
|
|
|
end
|
|
|
|
|
2014-09-27 17:32:29 +00:00
|
|
|
depends_on "openssl"
|
|
|
|
|
2011-05-15 10:04:07 +00:00
|
|
|
def install
|
2014-05-29 04:07:45 +00:00
|
|
|
ENV.deparallelize
|
2014-09-27 15:14:28 +00:00
|
|
|
|
2015-02-17 13:50:16 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--sbindir=#{bin}
|
|
|
|
--localstatedir=#{var}
|
|
|
|
--with-openssl-includes=#{Formula["openssl"].opt_include}
|
|
|
|
--with-openssl-libraries=#{Formula["openssl"].opt_lib}
|
2014-09-27 17:32:29 +00:00
|
|
|
]
|
|
|
|
|
2014-09-27 15:14:28 +00:00
|
|
|
if build.stable?
|
2015-02-17 13:50:16 +00:00
|
|
|
# libtool is glibtool on OS X
|
|
|
|
inreplace "configure.in", "libtool,,", "glibtool,,"
|
|
|
|
inreplace "autogen.sh", "libtool", "glibtool"
|
|
|
|
|
2014-09-27 15:14:28 +00:00
|
|
|
args << "--with-system-libtool"
|
|
|
|
args << "--with-system-libltdl"
|
|
|
|
system "./autogen.sh"
|
|
|
|
end
|
2014-09-27 17:32:29 +00:00
|
|
|
|
2014-09-27 15:14:28 +00:00
|
|
|
if build.devel?
|
2015-02-17 13:50:16 +00:00
|
|
|
args << "--with-talloc-lib-dir=#{Formula["talloc"].opt_lib}"
|
|
|
|
args << "--with-talloc-include-dir=#{Formula["talloc"].opt_include}"
|
2014-09-27 15:14:28 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2011-05-15 10:04:07 +00:00
|
|
|
system "make"
|
2014-08-24 16:07:10 +00:00
|
|
|
system "make", "install"
|
2011-05-15 10:04:07 +00:00
|
|
|
end
|
2014-05-29 04:13:57 +00:00
|
|
|
|
|
|
|
def post_install
|
2014-05-29 04:17:02 +00:00
|
|
|
(var/"run/radiusd").mkpath
|
2014-05-29 04:13:57 +00:00
|
|
|
(var/"log/radius").mkpath
|
|
|
|
end
|
2012-10-16 20:09:03 +00:00
|
|
|
|
2015-02-17 13:50:16 +00:00
|
|
|
test do
|
|
|
|
assert_match /77C8009C912CFFCF3832C92FC614B7D1/, shell_output("#{bin}/smbencrypt homebrew")
|
|
|
|
end
|
|
|
|
end
|