33 lines
792 B
Ruby
33 lines
792 B
Ruby
|
class Cups < Formula
|
||
|
desc "Common UNIX Printing System"
|
||
|
homepage "https://www.cups.org"
|
||
|
url "https://github.com/apple/cups/releases/download/v2.3.0/cups-2.3.0-source.tar.gz"
|
||
|
sha256 "acaf0229cf008ea8f06353ffd1bbd62d71dbe88990dd3330650ef87edb95a1a5"
|
||
|
|
||
|
keg_only :provided_by_macos
|
||
|
|
||
|
uses_from_macos "zlib"
|
||
|
|
||
|
def install
|
||
|
system "./configure", "--disable-debug",
|
||
|
"--with-components=core",
|
||
|
"--without-bundledir",
|
||
|
"--prefix=#{prefix}"
|
||
|
system "make", "install"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
pid = fork do
|
||
|
exec "#{bin}/ippeveprinter", "Homebrew Test Printer"
|
||
|
end
|
||
|
|
||
|
begin
|
||
|
sleep 2
|
||
|
system "#{bin}/ippfind"
|
||
|
ensure
|
||
|
Process.kill("TERM", pid)
|
||
|
Process.wait(pid)
|
||
|
end
|
||
|
end
|
||
|
end
|