40 lines
1.3 KiB
Ruby
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-5.19.0.tar.xz"
|
|
sha256 "26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791"
|
|
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: "ef7473eedc1dd4f3e2c95712fd5e920c49480a821c4c0e423a0c52fe69a874c1"
|
|
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
|