2011-03-10 05:11:03 +00:00
|
|
|
class Aggregate < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Optimizes lists of prefixes to reduce list lengths"
|
2016-02-28 19:35:26 +00:00
|
|
|
# Note - Freecode is no longer being updated.
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://freecode.com/projects/aggregate/"
|
2016-02-28 01:28:57 +00:00
|
|
|
url "https://ftp.isc.org/isc/aggregate/aggregate-1.6.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "166503005cd8722c730e530cc90652ddfa198a25624914c65dffc3eb87ba5482"
|
2010-12-30 06:04:31 +00:00
|
|
|
|
2014-06-29 03:47:43 +00:00
|
|
|
bottle do
|
2016-02-28 19:03:17 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-09-26 01:59:53 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "ebe7aa16c7cf36684463292995c60fdde12cdac889de551d8f85b89e6b77416c" => :sierra
|
2016-02-28 19:03:17 +00:00
|
|
|
sha256 "87507a739f2bd5ba57ccd23b34f2b7c41d68a897c128231dbbc32ba23b869ed5" => :el_capitan
|
|
|
|
sha256 "813ccd28b00f94e1574079f7f6816858e32c5d8f9a964b783307d25c7e449d2b" => :yosemite
|
|
|
|
sha256 "169598a0d41382215ba51ed0c377c98857804e82fb1658414dd04ee94ddbb993" => :mavericks
|
2014-06-29 03:47:43 +00:00
|
|
|
end
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
conflicts_with "crush-tools", :because => "both install an `aggregate` binary"
|
2013-11-08 06:29:59 +00:00
|
|
|
|
2010-12-30 06:04:31 +00:00
|
|
|
def install
|
|
|
|
bin.mkpath
|
|
|
|
man1.mkpath
|
2012-02-13 03:35:43 +00:00
|
|
|
|
|
|
|
# Makefile doesn't respect --mandir or MANDIR
|
|
|
|
inreplace "Makefile.in", "$(prefix)/man/man1", "$(prefix)/share/man/man1"
|
|
|
|
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "CFLAGS=#{ENV.cflags}",
|
|
|
|
"LDFLAGS=#{ENV.ldflags}",
|
|
|
|
"install"
|
2010-12-30 06:04:31 +00:00
|
|
|
end
|
2017-03-29 08:35:27 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
# Test case taken from here: http://horms.net/projects/aggregate/examples.shtml
|
|
|
|
test_input = <<-EOS.undent
|
|
|
|
10.0.0.0/19
|
|
|
|
10.0.255.0/24
|
|
|
|
10.1.0.0/24
|
|
|
|
10.1.1.0/24
|
|
|
|
10.1.2.0/24
|
|
|
|
10.1.2.0/25
|
|
|
|
10.1.2.128/25
|
|
|
|
10.1.3.0/25
|
|
|
|
EOS
|
|
|
|
|
|
|
|
expected_output = <<-EOS.undent
|
|
|
|
10.0.0.0/19
|
|
|
|
10.0.255.0/24
|
|
|
|
10.1.0.0/23
|
|
|
|
10.1.2.0/24
|
|
|
|
10.1.3.0/25
|
|
|
|
EOS
|
|
|
|
|
|
|
|
assert_equal expected_output, pipe_output("#{bin}/aggregate", test_input), "Test Failed"
|
|
|
|
end
|
2010-12-30 06:04:31 +00:00
|
|
|
end
|