homebrew-core/Formula/inotify-tools.rb

34 lines
1.1 KiB
Ruby

class InotifyTools < Formula
desc "C library and command-line programs providing a simple interface to inotify"
homepage "https://github.com/inotify-tools/inotify-tools"
url "https://github.com/inotify-tools/inotify-tools/archive/refs/tags/3.22.6.0.tar.gz"
sha256 "c6b7e70f1df09e386217102a1fe041cfc15fa4f3d683d2970140b6814cf2ed12"
license "GPL-2.0-or-later"
bottle do
sha256 cellar: :any_skip_relocation, x86_64_linux: "217cb8bbe5f6fb2a15b73e8f9edb670b2a639a5781ef922d4b85a5e0061d4857"
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on :linux
def install
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}",
"--mandir=#{man}",
"--disable-dependency-tracking"
system "make", "install"
end
test do
touch "test.txt"
stdin, stdout, stderr, = Open3.popen3("#{bin}/inotifywatch test.txt --timeout 2")
stdin.close
assert_match "Establishing watches", stderr.read
stdout.close
stderr.close
end
end