1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
require 'formula' class Html2text < Formula homepage 'http://www.mbayer.de/html2text/' url 'http://www.mbayer.de/html2text/downloads/html2text-1.3.2a.tar.gz' sha1 '91d46e3218d05b0783bebee96a14f0df0eb9773e' # Patch provided by author. See: # http://www.mbayer.de/html2text/faq.shtml#sect6 patch do url "http://www.mbayer.de/html2text/downloads/patch-utf8-html2text-1.3.2a.diff" sha1 "3e928c75495aa6d8f071bcf61d2ceba0eb748811" end def install inreplace 'configure', 'for i in "CC" "g++" "cc" "$CC"; do', 'for i in "g++"; do' system "./configure" system "make all" bin.install "html2text" man1.install "html2text.1.gz" man5.install "html2textrc.5.gz" end test do path = testpath/"index.html" path.write <<-EOS.undent
Hello World
EOS output = `#{bin}/html2text #{path}`.strip assert_equal "Hello World", output assert_equal 0, $?.exitstatus end end| aboutsummaryrefslogtreecommitdiffstats |