30 lines
878 B
Ruby
30 lines
878 B
Ruby
class Libnfnetlink < Formula
|
|
desc "Low-level library for netfilter related communication"
|
|
homepage "https://www.netfilter.org/projects/libnfnetlink"
|
|
url "https://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-1.0.1.tar.bz2"
|
|
sha256 "f270e19de9127642d2a11589ef2ec97ef90a649a74f56cf9a96306b04817b51a"
|
|
license "LGPL-2.1-or-later"
|
|
|
|
depends_on :linux
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <libnfnetlink/libnfnetlink.h>
|
|
|
|
int main() {
|
|
int i = NFNL_BUFFSIZE;
|
|
}
|
|
EOS
|
|
|
|
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lnfnetlink", "-o", "test"
|
|
end
|
|
end
|