/Formula/surfraw.rb

https://github.com/Homebrew/homebrew-core · Ruby · 29 lines · 29 code · 0 blank · 0 comment · 0 complexity · 577e81b75619cb2dbfc2f82a6b13fe0f MD5 · raw file

  1. class Surfraw < Formula
  2. desc "Shell Users' Revolutionary Front Rage Against the Web"
  3. homepage "https://packages.debian.org/sid/surfraw"
  4. url "https://ftp.openbsd.org/pub/OpenBSD/distfiles/surfraw-2.3.0.tar.gz"
  5. sha256 "ad0420583c8cdd84a31437e59536f8070f15ba4585598d82638b950e5c5c3625"
  6. bottle do
  7. cellar :any_skip_relocation
  8. sha256 "2a2267217bfdd25ea00b3a08f76c44518e33dac0192a8590e4b3bfa3b5d90073" => :catalina
  9. sha256 "c9f5fc8020b021799c68cd204d4612f487c44315c15967be78a037576b378920" => :mojave
  10. sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :high_sierra
  11. sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :sierra
  12. sha256 "69920395cbde5fdc2492aa27fc765d4dafe910e26d9d3a05777888425310a0a9" => :el_capitan
  13. end
  14. def install
  15. system "./configure", "--prefix=#{prefix}",
  16. "--sysconfdir=#{etc}",
  17. "--with-graphical-browser=open"
  18. system "make"
  19. ENV.deparallelize
  20. system "make", "install"
  21. end
  22. test do
  23. output = shell_output("#{bin}/surfraw -p duckduckgo homebrew")
  24. assert_equal "https://duckduckgo.com/lite/?q=homebrew", output.chomp
  25. end
  26. end