33 lines
1.0 KiB
Ruby
33 lines
1.0 KiB
Ruby
class Kmod < Formula
|
|
desc "Linux kernel module handling"
|
|
homepage "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git"
|
|
url "https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz"
|
|
sha256 "f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f"
|
|
license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"]
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "fd2381a295cd23ad7ed2c8ea088d4a23b48071cc71c8c385418fb80ee822cb1a"
|
|
end
|
|
|
|
depends_on :linux
|
|
|
|
def install
|
|
system "./configure", "--with-bashcompletiondir=#{bash_completion}",
|
|
*std_configure_args, "--disable-silent-rules"
|
|
system "make"
|
|
system "make", "install"
|
|
|
|
bin.install_symlink "kmod" => "depmod"
|
|
bin.install_symlink "kmod" => "lsmod"
|
|
bin.install_symlink "kmod" => "modinfo"
|
|
bin.install_symlink "kmod" => "insmod"
|
|
bin.install_symlink "kmod" => "modprobe"
|
|
bin.install_symlink "kmod" => "rmmod"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/kmod", "help"
|
|
assert_match "Module", shell_output("#{bin}/kmod list")
|
|
end
|
|
end
|