homebrew-core/Formula/iproute2.rb

40 lines
1.3 KiB
Ruby

class Iproute2 < Formula
desc "Linux routing utilities"
homepage "https://wiki.linuxfoundation.org/networking/iproute2"
url "https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-v6.1.0.tar.xz"
sha256 "b58b95f34c5b6e8171d1833ccfcf43c86aaa064c99419bd1b2a2eb7ee741f089"
license "GPL-2.0-only"
head "https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", branch: "main"
livecheck do
url "https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/"
regex(/href=.*?iproute2[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 cellar: :any_skip_relocation, x86_64_linux: "e44296638b851bde19bea18f2405c95a5bc1cec9f0c8a03be7ee4f3507a344b3"
end
depends_on "bison" => :build
depends_on "flex" => :build
depends_on :linux
def install
system "make"
system "make", "install",
"PREFIX=#{prefix}",
"SBINDIR=#{sbin}",
"CONFDIR=#{etc}/iproute2",
"NETNS_RUN_DIR=#{var}/run/netns",
"NETNS_ETC_DIR=#{etc}/netns",
"ARPDDIR=#{var}/lib/arpd",
"KERNEL_INCLUDE=#{include}",
"DBM_INCLUDE=#{include}"
end
test do
output = shell_output("#{sbin}/ip addr").strip
assert_match "link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00", output
end
end